1
给出下面的代码的任何想法为什么突出显示被触发两次运行?我确认它使用两次以上的警报运行两次。在这里看到什么不对?JQUERY在此ScrollTo Highlight代码段中运行两次?
//Scroll to the Anchor in the URL, if there is one
var destination = $(document.location.hash).offset().top;
$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-20}, 500, function() {
// Animation complete.
$(document.location.hash).effect("highlight", {}, 3000);
});