How do I unbind another jQuery function on .click()?
<p>I have this script that run to fix my menu bar to the browser on scroll. Nothing really needs to change here (works as it should). However, you may need it...</p>

<pre><code>var div = $('#wizMenuWrap');
var editor = $('#main_wrapper');
var start = $(div).offset().top;

$(function fixedPackage(){   
    $.event.add(window, "scroll", function() {
        var p = $(window).scrollTop();
        $(div).css('position',((p)&gt;start) ? 'fixed' : 'static');
        $(div).css('top',((p)&gt;start) ? '0px' : '');

        //Adds TOP margin to #main_wrapper (required)
        $(editor).css('position',((p)&gt;start) ? 'relative' : 'static');
        $(editor).css('top',((p)&gt;start) ? '88px' : '');
    }); 
});
</code></pre>

<p>Now for the issue at hand. I have another script function that calls a modal pop-up (which again works as it should). However, it's not slick from a UI perspective when I scroll the page when the modals open. So I want to disable the script above when the modal script below is called. In other words, when I click to open the modal pop-up, the script above shouldn't work.</p>

<pre><code>$(function () {

var setUp = $('.setupButton');

// SHOWS SPECIFIED VIEW

$(setUp).click(function () {        
    $('#setupPanel').modal('show');
    //PREVENTS PACKAGE SELECT FIXED POSITION ON SCROLL
    $(setUp).unbind('click',fixedPackage);
});

})
</code></pre>

<p>As you can see above, I tried to unbind the scroll function (the first code snippet), but this is not correct.</p>

<p>These two scripts are in two separate js libraries.</p>
