ユーザーが「x」をクリックしてqtip2モーダルを閉じると、jqueryで何かをトリガーしようとしています。
私のモーダルのJSは次のとおりです。
<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: function(event,api) {」行に気付いた場合、ユーザーがモーダルの外側をクリックしてモーダルを閉じると、これは正常に機能しますが、ユーザーが「x」をクリックしてモーダルを閉じると、単に閉じます。モーダル。ユーザーが「x」をクリックしたときに「何かをする」にはどうすればよいですか?
ありがとう。