Tagetting LI with specific class then hiding all other LIs
<p>I have a UL of LIs in HTML like so:</p>

<pre><code>&lt;ul class="example"&gt;
&lt;li class="class1"&gt;&lt;a href="#"&gt;&lt;img src="images/01.jpg" width="980" height="400" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="class2 class1"&gt;&lt;a href="#"&gt;&lt;img src="images/02.jpg" width="980" height="400" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="class3"&gt;&lt;a href="#"&gt;&lt;img src="images/03.jpg" width="980" height="400" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="class1"&gt;&lt;a href="#"&gt;&lt;img src="images/04.jpg" width="980" height="400" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>I want to use jQuery to select all of the LIs which do not have the class "Class1" and remove them from view. How can I do this? I thought the below should work but it does not seem to be working?</p>

<pre><code>$("ul.example:not(li.class1)").hide(); 
</code></pre>
