This is most likely just a syntax error on my part. But resizeTime just won't find out. The timer simply continues to work regardless of the use of clearInterval on it more than once. Any ideas? I posted my real code:
var resizeTime; // declared outside of wrapper function to INSURE no second declaration will occur var myTransitionEvent = whichTransitionEvent(); $(window).bind('adapt', function(){ console.log('start', resizeTime); resizeTime = setInterval(function(){ console.log('go', resizeTime); methods.relayoutChildren.apply(self); }, 5); setTimeout(function(){ console.log('sNend', resizeTime); clearInterval(resizeTime); },1000); }); $('#allies-wrap').bind(myTransitionEvent, function(){ console.log('end', resizeTime); clearInterval(resizeTime); methods.relayoutChildren.apply(self); });
Here is an example of a chrome magazine:
start undefined start 8215 (10) go 8218 start 8218 start 8221 (256) go 8224 (2) sNend 8224 (9) go 8224 sNend 8224 (3) go 8224 sNend 8224 (2596) go 8224
for those who do not know the chrome magazine, (2596) means 2596 cases of an identical magazine.
javascript jquery
Fresheyeball
source share