Popup Window After AddThis Window Closes
I would like to check to see if the AddThis popup window is closed, then
create a popup window after it is closed. I am not sure if it is not
working because of incorrect code or because of cross-domain policy. I
also looked into endpoint documentation for AddThis
(http://support.addthis.com/customer/portal/articles/381265-addthis-sharing-endpoints#.Uh4SreL3PBj),
which as far as I understand is for extending the ability of AddThis.
Thanks for any help.
var PopUpCloses = function(){
alert("This is a popup");
};
var win = location.href("http://api.addthis.com/oexchange/0.8/");
var pollTimer = window.setInterval(function() {
if (win.closed !== false) { // !== is required for compatibility with Opera
window.clearInterval(pollTimer);
PopUpCloses();
}
}, 200);
No comments:
Post a Comment