I currently have this, it was working in jsFiddle, though its giving me errors, and not working when I use it outside of fiddle.
$('.down-photo').click(function() {
$(this).parent('.img-mask').toggleClass('hide');
});
Firebug says:
Uncaught SyntaxError: Unexpected Token ILLEGAL
I’m newer to javascript and jQuery so I’m not sure what’s wrong or what that error means.
Thanks!
In the code in your question there is a non-printing character after the last semicolon. It seems to be character 8203, a Unicode zero-width space. That’s the illegal token that Firebug is telling you about.
You’ll notice, if you edit the text in your question, that if you put the cursor to the left of that last semicolon and then press the right arrow a few times it takes one more keypress than you’d expect to get to the next line – that’s the character I mean.
Delete that character, or manually retype the line (rather than copy/pasting), and it should be fine.