我有一些jquery代碼在firebug chrome中拾取一些問題。無法修復jquery/javascript錯誤
任何幫助將是偉大的,請更新小提琴。
請參閱小提琴的鏈接。
圖像0jquery problem http://oi43.tinypic.com/2nst1dt.jpg
/* SHOW CATEGORIES
===================================================================*/
$('.normal-btn\.interest').click(function(e){
// Prevent the event from bubbling up the DOM tree
e.stopPropagation();
$('.categories-wrap').fadeIn(); // must be hidden, to fade in
});
$(document, '.normal-btn\.interest').click(function(){
$('.categories-wrap').fadeOut(); // must be visible, to fade out
});
var offset = $(".sticky-header").offset();
var sticky = document.getElementById("sticky-header")
var additionalPixels = 50;
$(window).scroll(function() {
if ($(window).scrollTop() > offset.top - additionalPixels) {
$('#profile-container').addClass('fixed');
} else {
$('#profile-container').removeClass('fixed');
}
});
我猜想,偏移量要麼引用了很多元素,要麼沒有。 – Archer
jQuery是用JavaScript編寫的。 –