Answers for "jquery add class on click then remove"

1

jquery add remove class clicked element

$(function() {
    $('img').click(function() {
       $(this).toggleClass('active');
    });
});
Posted by: Guest on January-19-2021
1

add and remove class in jquery

$('#toggle li').on('click', function () {
    $(this).toggleClass('open')
});
Posted by: Guest on June-04-2020

Code answers related to "jquery add class on click then remove"

Code answers related to "Javascript"

Browse Popular Code Answers by Language