私は画像にいくつかのjQueryエフェクトを使用しています。しかし、もっとボタンをロードするをクリックすると、JQueryの次のイメージを操作しないでください。問題はDomです。だから、私は.liveでjQueryコードを使用したいが、私は.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
@ user1213807私の記事を参照してください。 – sp00m
投稿とコードを編集しました。もう一度見て? – Karmacoma