javascriptjquery

declaring a variable blocks my code


is something wrong here? declaring those variables stops the execution of my code :(

var color = $('fieldset input[type=checkbox]').data("color");
        if(color === orange){var bgy = '-1'}
        else{var bgy = '-37'};

If you need more info please ask me :)


Solution

  • Did you mean color=='orange'?

    If it didn't help please alert the value of color.