I have the following jquery function for a click event on a class:
JS
$('a[rel=blue]').click(function(){
$('.ffHide').css("display", "none");
});
Now this works great, except I want to pass two classes to the function, how do I do that?
What I want to do:
$('a[rel=blue]', 'a[rel=black]').click(function(){
$('.ffHide').css("display", "none");
});
but this does not work…
Just a sidenote – you better use
.on()for attaching event listeners, like: