我正在使用 Scrollify 插件。单击按钮时,我想移动到某个部分。但是当我设置sectionName
为时false
,它似乎不起作用。sectionName
当未设置为时它工作正常false
,但我不想在我的地址栏上看到 # 因为当我刷新/重新加载页面(例如在第 3 部分)并滚动时,它会滚动到下一部分(从第一节到第四节)。
有没有办法在什么时候移动到特定sectionName
部分false
?
这是我到目前为止所做的:
JS
$('.goNotify').click(function (e) {
e.preventDefault();
$.scrollify.move($(this).attr("href"));
});
HTML
<a href="#notify" class="goNotify">
<button id="btnDrive" class="btnNotif" type="button" name="btnDrive" title="Get Notified When Available">Get Notified When Available</button>
</a>
<section id="notify" class="panel" data-section-name="notify">
<!-- content -->
</section>
谢谢!:)