English 中文(简体)
如何停止表演?
原标题:Jquery how to stop a show() function?
  • 时间:2011-11-10 14:22:32
  •  标签:
  • jquery

我有这一法典:

    $( #label, #btlabel ).live( hover ,function(){

        parent = $(this).parent().attr( id );
        position = $(this).parent().position();
        positionTop = (position.top)-45; 

        text = translate( zones_ +parent+ _tooltip ,lang);

        $( span#tooltips ).html(text); 
        height = $( span#tooltips ).height();
        if (height == 16){positionTop = (positionTop + 16);}
        if ($(this).parent().hasClass( advanced )) {positionTop = (positionTop + 260);} 
        $( span#tooltips ).css( top ,positionTop).delay(5000).show(0);

     });

    $( #label, #btlabel ).live( mouseout ,function(){   
$( span#tooltips ).hide();
     }); 

如果贴上标签,我使用的是显示/使用工具。 推迟表演(显示)的功劳,但是,如果停播功能被叫的话,我需要停止执行(此时,如果在5秒钟之前,你在标签上被 h倒,工具仍然显示)。 我尝试了停下来,但找不到工作。

是否有人解释我如何能够这样做?

感谢任何帮助

最佳回答

As it says at http://api.jquery.com/delay/ use setTimeout instead which can be cancelled.

延迟处理法最好能延迟定点效果。 由于其局限性,例如,它提供了取消拖延的办法,因此,拖延不是 Java本古典本土固定时间功能的替代,而这种功能可能更适合某些使用情况。

问题回答




相关问题
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: &...

热门标签