我在圖片上使用了一些jQuery效果。但是當我點擊加載更多按鈕時,請不要使用JQuery下一張圖片。問題是Dom準備好了。所以,我想用我的jQuery代碼與.live,但我不知道如何使用.live如何在.live中使用這個jQuery代碼?
請幫助我,謝謝。
1:
var hoverImg = '<div class="hoverimg"></div>';
$(".thumb").each(function(){
$(this).children("div").each(function(){
$(this).find("a").append(hoverImg);
});
});
$(".thumb div").hover(function() {
$(this).find(".hoverimg").animate({ opacity: 'toggle' });
});
$(".thumb").hover(function() {
$(this).find("div").each(function(){
$(this).find(".shadow").fadeOut(500);
});
});
2:
var shadowImg = '<div class="shadow"></div>';
$(".thumb").each(function(){
$(this).children("div").each(function(){
$(this).append(shadowImg);
});
});
3:
var c = '';
var d = '';
$('.view-content div.views-row').each(function(){
c = 0;
d = 0;
var i = 1;
d = $(this).find('.thumbimg').length;
$(this).find('.thumbimg').each(function(){
sayi=i++;
$(this).append('<div class="img_no">0'+sayi+'</div>');
});
});
謝謝,但仍然有問題。你可以在我的代碼上申請.live嗎? – Karmacoma 2012-04-19 14:20:14
@ user1213807查看我的帖子。 – sp00m 2012-04-19 14:23:33
編輯我的帖子和代碼。請再看一遍? – Karmacoma 2012-04-19 14:41:41