0

所以滚动页面或元素或位置非常简单。但是有谁知道如何让它在页面加载时自动工作?

我试过添加一个:

  $(document).ready(function() {
    $("#start2").trigger('click');
    });

链接到scrolltopage div,但没有成功。

4

1 回答 1

0

nevermind got it added

        <body
        onload="myScroll.scrollToElement('li:nth-child(3)', 0)" ;=""> 

with this in the html

       <div id="start2" onclick="myScroll.scrollToElement('li:nth-child(3)', 0);"/>

now anyone think it's possible to add an anchor to this so that the position changes dependent on the previous page?

于 2012-07-05T21:26:12.003 回答