Remove Class on input cheched not working
        Posted  
        
            by 
                Manna
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Manna
        
        
        
        Published on 2012-10-30T10:59:36Z
        Indexed on 
            2012/10/30
            11:00 UTC
        
        
        Read the original article
        Hit count: 222
        
I have set that if the Input checkbox is checked the opacity turn from 0.5 to 1.
It'not working, it actually works if i do the opposite, but this is not my goal!
My CSS code
    .opacitychange {opacity: 1;}
    #total {opacity: 0.5}
and
    if($("#iva").is(':checked'))
    {
        $('#total').html('+' + vat);
        total += vat;
        $('#total').addClass("opacitychange");
    }    
    else
        $('#total').html('0.00').removeClass("opacitychange");
    if($("#irpef").is(':checked'))
    {
        $('#total1').html('-' + irpf);
        total -= irpf;
        $('#total1').addClass("opacitychange");
    }
    else
        $('#total1').html('0.00').removeClass("opacitychange");
        $("#total2").html(total.toFixed(2));
    };
What's wrong?
Here the case
© Stack Overflow or respective owner