i select links with a blank target to set a title attribute
jQuery('a[target~="_blank"]').attr('title', 'New window');
that works.
But when i select the onclick attribute that doesn't work
jQuery('a[onclick~="_blank"]').attr('title', 'New window');
any clues?
the link looks like that:
<a onclick="javascript:this.target="_blank"" title="" href="http://link.com">link</a>
Use below code :
This seems to work for me using the Attribute Contains Selector -
Could you use that instead?
Demo - http://jsfiddle.net/uZaCW/
found that contains is * and not ~