同じページ内の上部/下部を移動するスムーズなイージング効果のために、次のスクリプトを使用しています。これをさまざまなブラウザーで正常に実装しましたが、Chrome でアニメーションを開始すると、ページがちらつきます。ページが一瞬でクリックされるとトップに移動し、ページがアニメーションを実行できるようにします。
Chrome のちらつき効果を取り除く可能性はありますか?
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript">
$(function() {
$('a').bind('click',function(event){
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1500,'easeInOutQuad');
/*
if you don't want to use the easing effects:
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1000);
*/
event.preventDefault();
});
});