本文介绍了移动到命名锚后的jQuery / JavaScript的处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在做一些jQuery处理后如何将焦点移动到不同的部分(锚点)在同一页上。
How do move focus to a different section (named anchor) on the same page after doing some jquery processing.
功能ABC()做了一些处理,之后,我需要将用户移动到部分相同的页面(进一步下跌的页面)。
Function ABC() does some processing and afterwards, I need to move the user to a section on the same page (further down the page).
推荐答案您可以用code以下滚动屏幕到< DIV ID =导航> 。只要改变选择您要滚动到的元素相匹配。
You can use the code below to scroll the screen to a <div id="navigation">. Just change the selector to match the element you want to scroll to.
$('html, body').animate({ scrollTop: $('#navigation').offset().top }, 'slow');更多推荐
移动到命名锚后的jQuery / JavaScript的处理
发布评论