lukehaas / Scrollify

A jQuery plugin that assists scrolling and snaps to sections.
MIT License
1.8k stars 578 forks source link

Make element have class if isn't some element #379

Closed MattTrovao closed 5 years ago

MattTrovao commented 5 years ago

I have the following scenario: if($("#topo").not(".active") || $("#rodape").not(".active")){ $("#boxVideo").css({"top": "-80px"}); $("#download").removeClass("fixed"); };

Now I want add class fixed to my Download div, there is five divs that must follow this rule. I try if element1 hasClass(".active") || element2 hasClass(".active") || ... element5 hasClass(".active")
But that don't work, the class fixed is give when element1 has the class, but if I scroll the class is remove even if he is element2.

I can't make a jsdfille from the site I am creating, but i can make a similar.

lukehaas commented 5 years ago

This is not a Scrollify issue.