Hey Karl. That code just sets the element class attribute to empty:

from this: 

<a class="video"/>

to this

<a class=""/>


Thanks.

Try $(".video").toggleClass("video active");

Karl Rudd

On Nov 22, 2007 10:23 AM,  <[EMAIL PROTECTED]> wrote:
>
> The problem with the code below is that it modifies the tag to look like
> this:
>
>
>  Code:
>  <a class="video video.active"/>
>
>  When it needs to look like this:
>
>
>  Code:
>  <a class="video active"/>
>
>  Here is the code that I'm using:
>
>
>  Code:
>  function swapMode(mediaType) {
>
>  $(".music.active").toggleClass("music");
>  $(".video.active").toggleClass("video");
>  $(".radio.active").toggleClass("radio");
>
>  if (mediaType == "1")
>  $(".video").toggleClass(".video.active");
>  else if (mediaType == "2")
>  $(".music").toggleClass(".music.active");
>  else if (mediaType == "3")
>  $(".radio").toggleClass(".radio.active");
>
>  }
>
>  Thanks for your help
>

Reply via email to