Reputation:
i have select the element in jQuery who used currently clicked. i try parent but that's not worked so i try the closest tag in jQuery
$(this).closest('.posts').children('.cbl h1').html('1')
i try this and it's work fine to selection means i select the tag .cbl h1 successfully. now tell me how i can change the text to 1.
structure
<div class='posts'>
<div class='cbl'>
</div>
<div><div>$(this) element is here</div></div>
</div>
Upvotes: 1
Views: 5683