I have attempted this, but unfortunately did not achieve the desired result. I am just brainstorming my ideas here.
HTML
<html>
<div>
<div class="spinner">
</div>
</div>
</html>
Jquery
if (".spinner"){
this.parent.addClass()
}
else {
this.parent.removeClass() }
My goal is to have CSS styling added to the parent class of the spinner when the spinner class is present in the HTML code. If the spinner class is removed from the HTML, the style added to the spinner's parent class should also be removed. How can I accomplish this?
Thank you for your advice.