虽然仅在帮助scrollerOffset时发生,但事件立即触发。我希望所有相同的特定ID ..
插件:http://smoothdivscroll.com/
jsfiddle:http://jsfiddle.net/xmocartx/F5dRj/15/
$(document).ready(function () {
$("div#catalog_gallary").smoothDivScroll({
autoScrollingMode: "",
touchScrolling: true,
mouseOverRightHotSpot: function(eventObj, data) {
var scrollerOffset=$("#catalog_gallary").smoothDivScroll("getScrollerOffset");
if(scrollerOffset>1000)
$('body > ul > li:nth-child(2)').addClass('active');
}
});
});