我有this website,並且Smoothscroll javascript和lightbox之間存在衝突。SmoothScoll和燈箱衝突
下面是滾動
$(function() {
$('a[href*="#"]:not([href="#"])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html, body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
我怎樣才能解決這個問題的腳本?我怎樣才能使燈箱和平滑的滾動工作同時進行?
頁面上的lightbox觸發器在哪裏?你在哪一點得到這個衝突? –
每當我點擊「Characters」部分中的四個圖像時,一旦我添加了Smoothscroll的代碼,燈箱就不再工作了。 –