dimanche 6 juillet 2014

Get attribute with jquery


Vote count:

0




I'm trying to get Element attribute with jQuery


But this code not working



alert($("#1").attr("href"));


After searching I found this code



alert($("#1").get(0).href);


And It's working !


Why my first code is not working?



asked 1 min ago

CooPer

797





Aucun commentaire:

Enregistrer un commentaire