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