javascript - How to select child tag by closest tag in jQuery -
i have select element in jquery used clicked. try parent that's not worked try closest tag in jquery
$(this).closest('.posts').children('.cbl h1').html('1') i try , it's work fine selection means select tag .cbl h1 successfully. tell me how can change text 1.
structure
<div class='posts'> <div class='cbl'> </div> <div><div>$(this) element here</div></div> </div>
Comments
Post a Comment