Answer the question
In order to leave comments, you need to log in
How to make the code work?
Code runs without error, scroll event is handled but no classes are added
javascript:
pastie.org/private/dqoktl6r3pbhb0w7hep5a
coffeescript:
pastie.org/private/w5fiqoaeeuzayiozhnc1lq
Answer the question
In order to leave comments, you need to log in
Most likely, the script is connected in the head and there the body does not exist yet, but try to do the initialization on the full page load event like this
$(function(){
disableHover = new DisableHover($("body"));
disableHover.scroll();
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question