Following this post: add class to all links that link to a certain domain with js (jquery)
I attempted to add a class to hyperlinks with jquery, but it is causing me hell. I am developing a site locally which I added this code to (as well as having jquery linked to):
<script type="text/javascript">
$("a[href*='gallery']").addClass('thumb');
</script>
with no effect on my links. I decided to strip down the page to the barest bones, see if I could identify the problem. Still no effect. As soon as I place it online, it works:
http://www.anunexpectacle.com/files/test.html
Is there something about local dev that would stop this? Why am I unable to give my links a class by jquery? Please help!
Thanks, Matt