I am working with js and i need to remove one class and add another, in this case visible and invisible(self explanatory css i think), to all elements with the class ‘edit’. Is it possible to use a class as a selector for adding a class?
I have tried:
$(function){
$('#hide').click(function(){
$('.edit').addClass('visible');
});
};
This does not work. Any ideas?
You’re missing an opening parenthesis.
should be
Also, the
};at the end should be});. (Thanks, jmar777!)