English 中文(简体)
Qtip2 Modal,发射活动,在结标时
原标题:Qtip2 Modal, firing event when closing modal

I m trying to trigger something with jquery when the user clicks the "x" to close the qtip2 modal.

这里,我为我的Modal提出共同意见:

<script language="javascript" type="text/javascript">
$( .show_likes_modal ).live( mouseover , function(event) {//SHOW LIKES MODAL
    clearInterval(auto_refresh); auto_refresh = 0;
    var itemid = $(this).attr("itemid");
    var itemtype = $(this).attr("itemtype");
        $(this).qtip({
        id:  likesmodal ,
        content: {
            text:  <img src="images/loading.gif" alt="Loading..." /> ,
            ajax: {url:  modals/show_likes.php ,type:  GET ,data: { itemid: itemid,itemtype:itemtype}},
            title: { text:  People who like this: ,button: true}
        },
        position: {my:  centered ,at:  centered ,target: $(window)},
        show: {event:  click ,solo: true,modal: true},
        hide: false,
        style:  ui-tooltip-light ui-tooltip-rounded ,
        events: {
        hide: function(event, api){
         auto_refresh = setInterval(function (){$( #bottom_middle ).load(thisurl +  &timer=  + new Date().getTime() +   #bottom_middle  );}, 5000);             
         $(this).qtip("destroy"); 
        }
       }        
      }); 
return false;     
}); 
</script>

如果你注意到“hide:功能(event,api){”线,那么当用户在路面点外点击关闭时,该工作就会被罚款,但当用户点击“x”关闭该模式时,它就关闭了该模式。 当用户点击“x”时,我怎么能“做什么”?

感谢。

问题回答

为了赶上 but子的闭幕式,我发现,你需要追捕<条码>Mousedown,>.qtip-close,而不是<条码><<<<>>>>,但打得起。 我的假设是,gin子与它做些什么。

你们是否试图对 close子的点击事件具有约束力?

// > jQuery 1.7
$("a.ui-tooltip-close").on("click", function() { ... });

// < jQuery 1.7
$("a.ui-tooltip-close").click(function() { ... });




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

热门标签