我喜欢这个代码,当我运行点击功能需要支持2个单位之前页面为什么两次?
jQuery(document).ready(function ($) {
$('.pager .pages ol li a,#narrow-by-list dd ol li a,.currently ol li a,.actions a').on('click' ,function(event){
window.history.pushState({page: this.href}, null, this.href);
$('html, body').animate({
scrollTop: $("#uppp").offset().top - 60
}, 1300,'easeInOutExpo');
// event.preventDefault();
});
$(document).on("scroll mousedown DOMMouseScroll mousewheel keydown", function (e) {
if (e.which > 0 || e.type === "mousedown" || e.type === "mousewheel") {
$('html, body').stop();
}
});
window.onpopstate = function(event) {
var state = event.originalEvent.state;
window.location.href = document.location;
};
});