3 ms·
I gather you haven't done much jQuery coding. That's equivalent to: $("html div.title img.icon").attr("src") The last .attr("src") is purely because jQuery
by Groxx 16y ago
I gather you haven't done much jQuery coding. That's equivalent to:
$("html div.title img.icon").attr("src")
The last .attr("src") is purely because jQuery always deals with a node / a collection of nodes.
You can also do arbitrary attribute searches:
$("html div[class~='title'] img[src*='google']")
// "~=" == "contains word" - space-delimited to match html classes
// "*=" == "contains substring"
http://api.jquery.com/category/selectors/ http://api.jquery.com/category/selectors/
- nailer 16y agoYou're right, but jquery doesn't handle XML namespaces. Alas I wish it did.