font-size: 200%; It is an inbuilt method in jQuery. It works fine for that element: $(".main").click(function() { $(this).toggleClass("classA").toggleClass("classB"); }); But I would like to add to it to toggle classes for all elements on the page that have a particular class, say "togToo". .highlight { The jQuery toggleCLass() method is used to add or remove one or more classes from the selected elements.