jquery add class when element is clicked remove it when another element is clicked code example
Example: jquery add remove class clicked element
$(function() {
$('img').click(function() {
$(this).toggleClass('active');
});
});
$(function() {
$('img').click(function() {
$(this).toggleClass('active');
});
});