Reputation: 9080
Lets say I have named some elements with the following structure:
When I was looking for the value of 1:0 I found that the following code returned everything with a 1:0 in it:
alert($("[name$=" + arrayVal[i] + "]").val());
However when I took the "$" out it appears to only return the 1:0 in my above example. I did a quick search on Google but couldn't find anything to support this finding. Does anyone have any links they could point me to for this?
Thanks!
Upvotes: 1
Views: 300
Reputation: 103495
$=
is the "attribute ends with" selector.
http://api.jquery.com/category/selectors/
Upvotes: 1
Reputation: 630379
The $=
is the attribute ends-with selector, so what you got was the expected behavior.
For a full read, whch seems to be what you're after, you can find all of the attribute selectors here.
When in doubt, go to the source, the jQuery API Site, a quick search will answer most of your "what's this operator?" questions :)
Upvotes: 1