Is this proper use of jQuery?
<p>I have created a tabbed display with html/css.  I simply want to use jQuery to toggle the tabs/classes.  It works perfectly but I want to make sure I'm using jQuery properly.</p>

<p>Here's the html structure + jQuery:</p>

<pre><code>&lt;ul id="tabs"&gt;
&lt;li&gt;&lt;a href="#" id="tab1" class="activetab"&gt;Tab1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#" id="tab2"&gt;Tab2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div id="tabcontent"&gt;
&lt;div id="tab1content"&gt;
This is tab 1 content
&lt;/div&gt;
&lt;div id="tab2content"&gt;
This is tab 2 content
&lt;/div&gt;

 $("#tab1").click(function() {
           $("#tabcontent &gt; div").hide();
           $("#tab1content").show();
           $("#tabs &gt; li a").removeClass().addClass("inactivetab");
           $("#tab1").removeClass().addClass("activetab");
       });
</code></pre>

<p>The jQuery you see for tab1 is repeated for each tab.</p>
