Very new to jQuery, and I can't figure out why this little snippet of code isn't working. I set the background of the body to black, but I always return with the else statement, and my background turns orange instead of the desired pink.
$(document).ready(function(){
$("body").css("background","black");
if ($("body").css("background") == "black") {
$("body").css("background", "pink");
}
else {
$("body").css("background", "orange");
}
});
You can see what's happening here: http://jsfiddle.net/jH6Y9/1/