Click on the navigation page to specify the location of the slide


<Script>
$ (function () {
// Get the top of the city block distance
var city_top = $ ( '# city_top') offset () Top;..
. $ ( '. city_li') the Click (function () {
$ ( 'HTML, body') Animate ({scrollTop: city_top}, 500);.
})
})
</ Script>
---------------------
copyright : this article is CSDN blogger "eternal king" of the original article, follow the CC 4.0 by-sa copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/wang1006008051/article/details/79026031

Guess you like

Origin www.cnblogs.com/sjzgk/p/11363809.html