English 中文(简体)
• 如何使用这种可笑的法典?
原标题:How to use this jQuery codes with .live?
  • 时间:2012-04-19 13:59:14
  •  标签:
  • jquery

我用一些 j子对我的形象产生影响。 但是,当点击更多纽顿时, t不去打上JQuery的下一个图像。 问题已经成熟。 因此,我想使用我的长辈法典,但不知道如何使用。

我感谢您。

:

     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);
    });
});

:

var shadowImg =  <div class="shadow"></div> ;

$(".thumb").each(function(){
    $(this).children("div").each(function(){
        $(this).append(shadowImg);
    });
});

:

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> );
    });
});
问题回答

j1.7, 衰期(......)方法被折旧。 利用.on()附属活动处理器。

其运作方式如下:

$( #select_something_static ).on("click", ".something_dynamic", { anydata :True}, handler);

You call "on" on a static top level element of DOM (ascendant of dynamic nodes) and then select dynamic nodes. When event triggers on ascendant, jquery searches for selector (".something_dynamic" in my case), and if it was triggered there, calls handler and puts data ({ anydata :True} in my case) in event.data

使用<条码>。

1. 导言

$(".thumb div").on("hover", function() {
    $(this).find(".hoverimg").animate({ opacity:  toggle  });
});

$(".thumb").on("hover", function() {
    $(this).find("div").each(function(){
        $(this).find(".shadow").fadeOut(500);
    });
});




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签