If I click on #parent
I want to return the text inside it and not return the text inside nested
layers (#child-parent
, #child
)
<div id='parent'>
this text is for parent
<div id='child-parent'>
this text if for child-parent
<div id='child'>
and this text is for child.
</div>
</div>
</div>
this:
$('#parent').html() = "this text is for parent"
and not this:
$('#parent').html() = "this text is for parent this text is for child-parent and this text is for child"