I'm using the jquery-mousewheel.js plugin, and I'd like to decide, if user scrolls down, then the content should fade out, and the user should see the next section. During this event, a class changing, and the event should stop, and only the next scroll down should fire it again (bind/unbind). I've tried the code below but its not working, any advice is appreciated.
$('body').bind('mousewheel', function(event, delta) {
if (delta> 0){
return false;
} else{
if ($("#next-screen").hasClass("home")){
// Hide home, show news
$("#next-screen").removeClass();
$("#next-screen").addClass("news");
$( 'body' ).unbind( "mousewheel" );
} else
if ($("#next-screen").hasClass("news")){
//Here should bind again
//Hide news, show about
$("#next-screen").removeClass();
$("#next-screen").addClass("about");
}
//etc.
}
});