jQuery disable events not working
<p>I'm having trouble to disable my popup events on this. Here's the code </p>

<pre><code>var popupStatus = 0;

function loadPopup() {
    if (popupStatus == 0) {
        $("#backgroundPopup").css({
            "opacity": "0.7"
        });
        $("#backgroundPopup").fadeIn("slow");
        $("#popupContact").fadeIn("slow");
        popupStatus = 1;
    }
}

function disablePopup() {
    if (popupStatus == 1) {
        $("#backgroundPopup").fadeOut("slow");
        $("#popupContact").fadeOut("slow");
        popupStatus = 0;
    }
}

function centerPopup() {
    var windowWidth = document.documentElement.clientWidth;
    var windowHeight = document.documentElement.clientHeight;
    var popupHeight = $("#popupContact").height();
    var popupWidth = $("#popupContact").width();
    $("#popupContact").css({
        "position": "absolute",
        "top": windowHeight / 2 - popupHeight / 2,
        "left": windowWidth / 2 - popupWidth / 2
    });
    $("#backgroundPopup").css({
        "height": windowHeight
    });
}
$(document).ready(function () {
    // i change the code to .click to .hover 
    $(".button").hover(function () {
        //centering with css
        centerPopup();
        //load popup
        loadPopup();
    });
    $("#popupContactClose").click(function () {
        disablePopup();
    });
    $("#backgroundPopup").click(function () {
        disablePopup();
    });
    $(document).keypress(function (e) {
        if (e.keyCode == 27 &amp;&amp; popupStatus == 1) {
            disablePopup();
        }
    });
});
</code></pre>

<p>If I change the function of <code>.button</code> to <code>hover()</code>, iIt will execute the popup elements but I'm having a problem to disable the popup elements. </p>

<p>The previous code of this one is <code>click()</code> function.</p>

<p>What would be the problem with this?</p>
