jQuery: Click an element and add a class to a div, click away and it removes class
<p>I've researching this problem and I can find a solution for adding/removing a class to the div i'm clicking, but not a separate div altogether e.g.</p>

<p>Click the input with the class .search-bar....  and it adds a class to a div called .search-wrap...  click anywhere else on page/off element it removes the class added to .search-wrap.</p>

<p>I've tried this:</p>

<pre><code>$("div.search-bar").click(function(){
    $("div.search-wrap").addClass("white");
});
</code></pre>

<p>Any ideas please?</p>
