Reuse variable instead of new DOM search
<p>I am trying to use the menuBar object I've defined before to do a manipulation on objects within. </p>

<pre><code>var menuBar = $(".menu-bar ul");
var menuActive = menuBar.find("li.active");
menuBar.hover(function(){
    menuActive.toggleClass("active");
});
$('.menu-bar ul &gt; li &gt; a[href="'+ window.location.href +'"]').parent().addClass("active"); 
</code></pre>

<p>What I do not like is to call the DOM search once more to define the active class for link parent. </p>

<p>Any thoughts on how to do it with menuBar variable? </p>
