Hi All
I'm using a switch statement to see if the label for a checkbox has a particular id. If it does, I want it to toggle a class to format the checkbox. Works beautifully in IE9, FF, Opera, Safari, but IE8 has a kitten over it and does absolutely nothing. Here is an example of the line of code to set the toggle class, any ideas people as I have a client breathing down my neck at the moment.. LOL...
- switch(event.target.id)
{
case "BP":
$('label[for="'+ $(this).attr('id') +'"]').toggleClass('mapVtypesBV');
$(this).toggleClass('checked');
break;
case "HC":
$('label[for="'+ $(this).attr('id') +'"]').toggleClass('mapVtypesHC');
$(this).toggleClass('checked');
break;
case "SA":
$('label[for="'+ $(this).attr('id') +'"]').toggleClass('mapVtypesSA');
$(this).toggleClass('checked');
break;
default: }
Any help would be great... thanks
Phil