Here is a working example:https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_navbar_dropdown&stacked=h Level 1 swindleNswoonOP Posted 5 years ago So I am referencing Bootstrap directly through the Laravel framework via Laravel Mix, so the above example won't work as my app ...
$("button").click(function(){ $("p").toggleClass("main"); }); Try it Yourself » Definition and Usage The toggleClass() method toggles between adding and removing one or more class names from the selected elements. This method checks each element for the specified class names. The cl...
$("button").click(function(){ $("p").toggle(); }); Try it Yourself » Definition and Usage The toggle() method toggles betweenhide()andshow()for the selected elements. This method checks the selected elements for visibility. show() is run if an element is hidden. hide() is run ...