Here is the code I am using:
$("p").css("background-color", "yellow");
alert( $("p").css("background-color"));
The alert is showing undefined
instead of the expected color value.
I have tested this code on both Google Chrome and Firefox. Strangely, it works fine in the example provided by w3c website, even though I am using the same jQuery version.