Why isn't the boolean variable being detected?
<p>the console is not detecting <code>overExpand</code> as true at the end. Am I doing something wrong?</p>

<pre><code>var transLayer = $('.transparentBg');
var overExpand = false;
var overUl = false;


$(transLayer).hide();
console.log('transLayer hide'); // this is being logged

$('#header .nav .wrapper &gt; ul &gt; li.expand').hover(function(){ 
    overExpand = true;  
    console.log(overExpand);// this works = true    
}, function(){ 
    overUl = true;
});

console.log(overExpand); // this shows false
</code></pre>
