Posted By

hasantayyar on 07/09/09


Tagged

attribute selector


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

hasantayyar


jquery attribute selectors


 / Published in: jQuery
 

  1. $('img[src]')
  2.  
  3. $('img[src=test.gif]')
  4.  
  5. $('img[src^=test]') // starts with test
  6.  
  7. $('img[src$=gif]') // ends with "gif"
  8.  
  9. $('img[src*=test]') // contains
  10.  
  11. $('img[src^=test][src$=gif]') // starts wit "test" ends with "gif"

Report this snippet  

You need to login to post a comment.