Home » GK about computer and internet » Toggle Class on click

Here is the Jquery toggleClass() this is working like this:-

If you are clicking on div1 it will toggle(add/remove) main class from div2

 

$(“div1”).click(function(){
$(“div2”).toggleClass(“main”);
});

Related Posts with Thumbnails

No comments yet... Be the first to leave a reply!