The source code is:
Slide effect :
JQuery ("#topHeaderBlack"). Anmate ({scrollleft:jquery ("#" +nowflooruuid). Offset (). left},1000);
View Code
Topheaderblack is a div ID that contains the UL Li
jQuery ("#" +nowflooruuid) is the Li you need to anchor.
I am using the following code deformation to achieve the effect (after all, front slag, laughed at,)
$ ("Html,body"). Animate ({scrolltop:$ ("#box"). Offset (). top},1000)
View Code
The first thing to know about the use of the jquery animate method
Reference: http://www.w3school.com.cn/jquery/effect_animate.asp
Next jquery anchor jump and related operations (GO)
$ ("Html,body"). Animate ({scrolltop:$ ("#box"). Offset (). top},1000)
Reference: http://ygsilence.iteye.com/blog/1699906
The current project requirements are
<ul> has a lot of <li> and through the CSS is now the horizontal processing when Li too much when there will be rolling demand,
Then when you click on a <li> once again to enter the interface when you need to position the page to the <li> then you need an anchor point setting
The first method to use is the most primitive anchor point
That
1, location.href = "#firstAnchor"; Firstanchor is the anchor name.
2, Window.location.hash = Firstanchor; Firstanchor is the anchor name.
And, of course, the most primitive click events.
UL Li smooth jump for horizontal rolling anchor points