不工作我有一個函數試圖運行這個命令:jQuery的.find()在IE
if (action=='fadeIn') {
if ($(this).css('position') == "static") {
$(this).css({position: 'relative'});
}
$(this).append('<span class="bg_fade">')
}
var fader = $(this).find('.bg_fade');
alert(fader.attr('class'));
它工作在Firefox罰款,但在IE瀏覽器,警報返回undefined。有任何想法嗎?
整個代碼爲http://www.jakelauer.com/jquery/bgFade/jquery.bgFade.js
在jakelauer.com/jquery/bgFade
整個代碼在哪裏?試試這裏的例子:http://api.jquery.com/find/ – 2010-05-02 23:54:41
你的條件塊在IE中執行嗎?從這個代碼示例中,我們知道如何知道你的'action'變量是什麼,它是爲了什麼,設置它,你正在嘗試做什麼等。 – 2010-05-02 23:55:36
這裏是整個代碼:http://www.jakelauer。 com/jquery/bgFade/jquery.bgFade.js 用於http://www.jakelauer.com/jquery/bgFade/ – Jake 2010-05-03 00:00:25