Wednesday, July 31, 2013

Wildcards in jQuery selectors

To get all the elements starting with "jander" you should use:

$("[id^=jander]")


To get those that end with "jander"



$("[id$=jander]")


To get all the elements which name is starting with "jander" you should use:



$('input[name^="news"]')

No comments:

Post a Comment