I am using this function:
function myFunction(){
var position = $(window).scrollTop();
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if(scroll > position) {
// scrolling downwards
hypeDocument.showSceneNamed('Section 2', hypeDocument.kSceneTransitionCrossfade, 1.1);
}
position = scroll;
});
return false;
}
In my site, I want the user to get presented with a new page called a 'scene' (in the software I am using) every time they scroll down. This code works great once but when I set it up a second time for them to go to another 'scene' it just calls the first function again. Is there any way I can kill this function when scroll event is detected?
Thanks