Simple jQuery variable declaration?

Simple jQuery variable declaration?

Here is an example:

1
2
3
4
$(document).ready(function(){
    var color = "red";
    $("body").css("background-color", color);
});

This will take the color red and assign it as body background color.

Add a comment: