Rename the problematic "unload" event in Thickbox to "tb_unload", making it a true custom event, fixes #19189

git-svn-id: https://develop.svn.wordpress.org/trunk@19456 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2011-11-26 17:49:50 +00:00
parent b627c99686
commit d2e0a6feab
1 changed files with 2 additions and 2 deletions

View File

@ -225,7 +225,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
if(url.indexOf('TB_inline') != -1){
jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children());
jQuery("#TB_window").unload(function () {
jQuery("#TB_window").bind('tb_unload', function () {
jQuery('#' + params['inlineId']).append( jQuery("#TB_ajaxContent").children() ); // move elements back when you're finished
});
tb_position();
@ -275,7 +275,7 @@ function tb_showIframe(){
function tb_remove() {
jQuery("#TB_imageOff").unbind("click");
jQuery("#TB_closeWindowButton").unbind("click");
jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("tb_unload").unbind().remove();});
jQuery("#TB_load").remove();
if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
jQuery("body","html").css({height: "auto", width: "auto"});