Created
May 7, 2011 10:01
-
-
Save metamn/960378 to your computer and use it in GitHub Desktop.
Multiple Scroller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scrolling products at frontpage for all sections | |
jQuery.localScroll.defaults.axis = 'xy'; | |
jQuery(".section").each(function(){ | |
jQuery.localScroll({ | |
target: "#" + jQuery(this).attr('id') + " #articles", | |
duration: 1000, | |
hash: false, | |
onBefore:function( e, anchor, $target ){ | |
var sectionID = $target.selector.split(" ")[0]; | |
//var sectionID = "#" + $target[0].id.toString(); | |
var targetID = "#" + anchor.id.toString(); | |
if ( jQuery(sectionID).find(targetID).length == 0 ) { | |
return false; | |
} | |
}, | |
onAfter:function( anchor, settings ){ | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment