samedi 16 mai 2015

Access multiple items with same name in DOM

Using the web developer console I can access the content of the first item of particular class like this from the web console:

$(".license-box pre").text();

However, what if there is more than one object with the name "pre" which are members of the class "license-box"? How do I access instance 1, 2, n etc?




Aucun commentaire:

Enregistrer un commentaire