Phil Jackson
Phil Jackson

Reputation: 10288

Activate a function when thickbox is closed

could someone PLEASE advise me on how I can activate a function once Thickbox is closed, this would be much appreciated.

function tb_remove() {
    window.parent.pageUpdate();// << this is what i have tried
    $("#TB_imageOff").unbind("click");
    $("#TB_closeWindowButton").unbind("click");
    $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
    $("#TB_load").remove();
    if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
        $("body","html").css({height: "auto", width: "auto"});
        $("html").css("overflow","");
    }
    document.onkeydown = "";
    document.onkeyup = "";
    return false;
}

Upvotes: 2

Views: 384

Answers (1)

Emily
Emily

Reputation: 304

That function call should work - it does for my test case.

Are you using a Thickbox iframe?

Upvotes: 0

Related Questions