codes:
var jqueryObj=$("#readme");
alert(jqueryObj.length); // result == 0
can i get "#readme" from jqueryObj ? like:
alert(jqueryObj.selector); //i want get "#readme"
BTW: i want to get selector,not element ID, and jqueryObj.length == 0.
Uhm... have you tried? http://api.jquery.com/selector/
Edit: Deleted 'half a page of incorrect code' due to endless discussion. Refer to decezes answer for complete solution ...
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