var chk = "<div id='test'>Trying</div>";
alert($("#test",chk).html());
Well this JQuery by String is not working its so simple but it doesn't work =/ What is it wrong in it ? thanks in advance!
Try something like this:
var chk = "<div><span id='test'>Trying</span></div>";
alert($("#test",chk).html());
The first parameter "#test" is your selector (what you really want to get).
And the second parameter chk is your context (within your query / search is performed).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With