A number of HTML elements (p, a, span, etc.) in my page have a ‘title’ attribute. In order to call a method on such elements (that styles their titles), I can do the following:
$('[title]').method();
Now I need to prevent this from being called for all DIVs whose ID start with a specific string , say ‘myDiv‘.
I bet there is a special jquery selector syntax for doing that, but am just not able to get that.
Any help is appreciated!
try this
Documentation Attribute Starts With Selector
Documentation :not() Selector
update: you can also do it as
Documentation .not( selector )