jquery bind event depends on situation
<p>I want to know about jquery. Can we bind event depending on the variables / situation / another event?</p>

<p>for example, If the var X is 0, a div could be clicked, meanwhile if the var X is 1, the same div could not be clicked.</p>

<p>I made this jsfiddle <a href="http://jsfiddle.net/hKkVD/4/" rel="nofollow">http://jsfiddle.net/hKkVD/4/</a>
.of course it's not working, but you get the idea.</p>

<p>EDIT : Sorry I made some confusion. I need the variable to be checked BEFORE the click event is triggered. </p>

<p>So basically the variable is to check (and toggle) whether the event is permitted or not. Thanks</p>
