code_junkie

JQuery selector regular expressions

Nov 11th, 2011
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. <div class="asdf">
  2.  
  3. $("div:regex(class, .*sd.*)")
  4.  
  5. <div id="abcd"></div>
  6. <div id="abccd"></div>
  7. <div id="abcccd"></div>
  8. <div id="abd"></div>
  9.  
  10. $('div')
  11. .filter(function() {
  12. return this.id.match(/abc+d/);
  13. })
  14. .html("Matched!")
  15. ;
  16.  
  17. $("input[name='option[colour]'] :checked ")
Add Comment
Please, Sign In to add comment