jQuery Selector issue finding href with text category1 in it

Posted by sushil bharwani on Stack Overflow See other posts from Stack Overflow or by sushil bharwani
Published on 2010-05-20T12:58:06Z Indexed on 2010/05/20 13:00 UTC
Read the original article Hit count: 247

Filed under:
|

i have a set of hyperlinks with href = javascript:method('category1') and likewise category2 category3 ...

I want to select hyperlink with href containing category1 so i have written

jQuery(a[href*='category1']) but dont know why it also selects hyperlinks with category10 category11 category12 ... also

I understand that category1 is common in all of them but 'category1' should'nt be do i need to put ' with escape charaters.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery