The best and fastest way to switch elements style in jQuery?
<p>Adding <code>currentSelected</code> class when I click the item, and removing the previously-selected item's <code>currentSelected</code> class if I select another item. And remove <code>currentSelected</code> class when I click outside of the item list.</p>

<pre><code>&lt;ul&gt;
    &lt;li class="dataItem currentSelected"&gt;item 1&lt;/li&gt;
    &lt;li class="dataItem"&gt; item 2&lt;/li&gt;
    &lt;li class="dataItem"&gt; item 3&lt;/li&gt;
    &lt;li class="dataItem"&gt; item 4&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
