toggleclass onclick
<p>For my site i have a div with content.</p>

<p>Above the div i have tabs like:</p>

<pre><code>&lt;div id="tabs"&gt;
   &lt;div id="tab1" class="tab" onclick="tabClick('tab1');"&gt;
      Info
   &lt;/div&gt;
   &lt;div id="tab2" class="tab" onclick="tabClick('tab2');"&gt;
      Video
   &lt;/div&gt;
   &lt;div id="tab3" class="tab" onclick="tabClick('tab3');"&gt;
      Serie
   &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>if i click i want to toggle the class: tabactive.</p>

<p>I have the jquery:</p>

<pre><code>function tabClick(id)
{
     $(id).toggleClass("tabactief");      //add the class to the clicked element
}
</code></pre>

<p>but it aint working, is it wrong to use onclick to request a jquery action?</p>

<p>what i want to do is toggle the class of the clicked div to tabactief.</p>
