windowsxp — 2010-06-21T06:45:43-04:00 — #1
Here is a JQuery tutorial which I don't understand.
$("[href!='#']") =>select all elements with an href attribute NOT equal to "#".
$("[href$='.jpg']") =>select all elements with an href attribute that ends with ".jpg".
what is the $ inside ? what it does there ? There is already a $ outside . I guess $ has something to do with the href attribute that ends with . But how ? Could you please throw somelight on this syntax ? Can I apply this any other places ?
ruben_k — 2010-06-21T08:14:50-04:00 — #2
The blue $ is the method name attached to the jQuery object, the red $ is a search modifier (the opposite of '^', ^: starts with..., $: ends with...) for use within sizzle (the CSS selector matcher)