javascript - jQuery waypoint event triggered before reaching waypoint? -


i seem having problems executing waypoint event. executes before reach waypoint. strange thing is; set console.log see if waits waypoint , works fine. function execute @ right moment fadein executes document ready. javascript , jquery:

$(document).ready(function(){ $("#trigger").waypoint(function(down){     $("p#ptje").fadein(4000).removeclass("hidden");      triggeronce:true;     offset:'50%';  });  }); 

can me determine why executing 1 part on load , other part on waypoint properly? site up: athena.fhict.nl/users/i303973/pass

in index.js removing hidden class p.hidden. removing should allow to shown when waypoint activated.

$(document).ready(function(){     $("div.hidden").fadein(1500).removeclass("hidden");     $("h1.hidden").fadein(1500,function(){         //the line below causing paragraph shown before          //you scroll down waypoint          $("p.hidden").fadein(1500).removeclass("hidden");         $("img#arrowdown").fadein(1500).removeclass("hidden")     }).removeclass("hidden");     $("#cssmenu").sticky({topspacing:0});        }); 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -