Jquery bind without handler
<p>I've a 2 buttons with unique ids i.e. previousButton and nextButton with click event. I would like to enable or disable the click event on each buttons based on certain condition.</p>

<p>e.g. </p>

<pre><code>var a=2;
var b=4
if (a!=2)
{  
   $('#previousButton').unbind('click');
}
else{
  $('#previousButton').bind('click');
}

if (b!=4)
{  
   $('#nextButton').unbind('click');
}
else{
  $('#nextButton').bind('click');
}
</code></pre>

<p>Then I've code below:</p>

<pre><code> $('#nextButton').click (function(){    //do some logic when next
button is clicked. });

$('#previousButton').click (function(){    //do some logic when
previous button is clicked });
</code></pre>

<p><strong>Problem:</strong></p>

<ol>
<li><p>The unbind button works perfect but the bind button doesn't work at all once it's been unbind.</p></li>
<li><p>I tried to use  but this invokes the click event everytime this condition is met. But I just want to enable the click button and wait for click event to be triggred.</p></li>
</ol>

<blockquote>
  <p>$('#nextButton').bind('click',someHanlder);</p>
</blockquote>

<p>Is there anyway this can be achieved, please?</p>

<p><strong>Update</strong></p>

<p>Please note I don't want to invoke any function when bind is used. I just want to bind and make it ready for click event to be triggered. Otherwise, it invokes the function.  This is what I'm after:</p>

<ol>
<li>Unbind.</li>
<li>When button is clicked nothing should happen. </li>
<li>Bind (<strong>don't want click event to fire here</strong>)</li>
<li>When button is clicked then Click event should fire..</li>
</ol>

<p><strong>Update</strong>
Please see JSFiddler example below where the bind handler gets invoked straight away:
<a href="http://jsfiddle.net/myagdi/MCAKL/" rel="nofollow">http://jsfiddle.net/myagdi/MCAKL/</a></p>
