开发者

JQUERY: scrollTo: On page load goto 'x' div tag to the right

I need help. I have got开发者_如何学C a scroller working with next back buttons scrolling the div tags within 'scrollable' but I need to automatically jump to a div tag when the page is loaded or reloaded i.e. start at the 5 div tag along. is this possible? my code/example link below

$(function() { $("div.scrollable").scrollable(); });


$(function() { 
    $("div.scrollable").scrollable();
    var api = $("div.scrollable").data("scrollable");
    api.move(4); // moves the scroller 4 places
    // or: api.seekTo(5); goes directly to index set.
});

Havent tested, but on the site you can lookup the api functions. This should work. :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜