How to control jquery toggle?
<pre><code>var light = 'off';
$('#switch').toggle(function(){light='on'},function(){light='off'});


//in some case 
$('#something').mouseout(function(){light = 'off'});
</code></pre>

<p>For example I clicked the switch, then light is on, at that time I mouseout something, the light is off, I want to turn up the light again, and click the switch again, but the switch think the light is still on and execute light = off again. I have to click it twice to turn up the light , how to solve this problem?</p>
