How can I check if body has specific class? This is my case:
This returns a string of true or false when looking for a specific body class using jQuery's .hasClass:
true or false
.hasClass
if ($("body").hasClass("modal-open")) { $("body").removeClass("modal-open"); }