I have a div with class name: .sel-display-on.
When clicked, I want to change it to .sel-display-off with jquery. Is this possible at all? Will the css properties of this new class name be applied?
$('.sel-display-on').click(function (e) {
e.stopPropagation();
// change class name to .sel-display-off
});
Or, if you are sure that this element won’t have any other class names (not very good practice, but may be faster):