我想在对话框关闭时调用一个函数,但是出于测试目的,我现在只是在做一个警报,但以下不起作用。
$("#fbfullpostviewpage").bind("pagehide",function(){
alert("Dialog closed");
});
但是具有不同页面ID的相同代码有效吗?我如何让它也适用于这个页面?
标记:
if ((post.attachment.media !== undefined) &&
(post.attachment.media.length > 0) &&
(post.attachment.media[0].type == "photo")) {
markup += '<li><a href="#fbfullpostviewpage" class="item" data-rel="dialog" data-transition="pop" data-overlay-theme="e" data-inline="true" data-fullscreen="false"><img src="' + thumb_url + '">' +'<h5 style="white-space:normal;">' + name + '</h5><p>' +'posted this photo....</p><p>'+likes+'<img src="images/facebook-like-16.png"></p></a></li>';
}else {
markup += '<li><a href="#fbfullpostviewpage" class="item" data-rel="dialog" data-transition="pop" data-overlay-theme="e" data-inline="true" data-fullscreen="false"><img src="https://graph.facebook.com/' + id + '/picture">'+'<h5 style="white-space:normal;">' + name + '</h5><p>' + short_post +'....</p><p>'+likes+'<img src="images/facebook-like-16.png"></p></a></li>';
}