Answers for "jquery click addclass click removeclass"

1

jquery add remove class clicked element

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

addclass removeclass jquery

$( "p" ).addClass( "myClass yourClass" );
Posted by: Guest on April-27-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language