Find <a> with image extension in href (jQuery)
find, href, image, jquery
Solution
$('a').filter(function() {
return $(this).attr('href').match(/\.(jpg|png|gif)/i);
}).hide();
Problem
I need to find (and hide) all links with images (.jpg, .png, .gif) in href as they're causing my wordpress excerpts to break. Many thanks.