如果我点击按钮再次加载相同的页面

时间:2015-03-07 12:22:14

标签: jquery html forms button click

当我点击按钮时,始终在我的手机中加载相同的页面。它只发生在手机上。桌面和平板电脑,这是工作炉排。请帮忙。

<a href="#a2"  class="nav-btn">Next</a><a class="rest nav-btn">Reset</a>
$('a[href*=#a2]').click(function(e){
    var link = "#b11"
    gotoSection(link);
    //console.log(link);
});

function gotoSection(temp){
    var location = temp.split("#");
    $('div').find('h1').each(function( index ) {
      if($(this).data('url')==location[1]){
        var parent = $(this).parent();
        $('html, body').animate({scrollTop: $(parent).offset().top-70}, 1000);
      } 
    });
}

这是代码..请参考以下链接并使用手机打开。单击跳过按钮或下一个绿色按钮。 click this url

谢谢。

0 个答案:

没有答案
相关问题