jquery filter out specific element
<p>I'm implementing accordion-style behavior, where only one element can be displayed at one point. I thought it'd be simplistic to implement a <code>show(e)</code> function that takes an element, <code>e</code>, to be displayed and hides everything BUT <code>e</code>. It saves me the hassle of keeping track of which element is being displayed as well. I could just attach <code>show(e)</code> as a callback to each element of the accordion.</p>

<p>To do so, I was thinking the only way is to use <code>.each()</code> to iterate through all the elements ad compare each one to <code>e</code>, hiding it if it isn't equal to <code>e</code>.</p>

<p>However, I recall there being a jQuery <code>.filter</code> function (http://api.jquery.com/filter/) but it only matches with the element, and not the opposite. (i.e. if I call the function and pass it <code>e</code> it'll only match <code>e</code> and not everything BUT <code>e</code>.)</p>

<p>Is there any way to do so, or are there any recommendations for creating an accordion in general? Thanks in advance!</p>
