jQuery functions addClass and removeClass do not work properly when I use them to change the appearance of a checkbox in Internet Exploer (IE). However, they work fine in other browsers.
Here is sample code to illustrate my problem:
$('input:#chkbox').click(function()
{
//if($(this).is(":checked")){
if($('input:#chkbox').is(":checked"))
{
$('input:#chkbox').next("label").addClass("etykieta_wybrana");
}
else
{
$('input:#chkbox').next("label").removeClass("etykieta_wybrana");
}
});
To further test this, you can run the code using jsFiddler (does not work in IE): http://jsfiddle.net/tejek/pZJMd/