Hi all,
jQuery's cross browser support is amazing. However I was wondering whether the following script will work in any browser or not.
$("#block1").css('background','blue');
$("#block2").css('backgroundColor', '#0000ff');
$("#block3").css('background-color', 'rgb(0, 0, 255)');
if ( $("#block1").css('background-color') == $("#block2").css('background-color') &&
$("#block1").css('background-color') == $("#block3").css('background-color') )
{
alert ( 'same color : ' + $("#block1").css('background') );
}
As you see these 3 different setter methods do exactly the same thing. Changing the background color to blue.
It seems that there are translations for the setter method of the .css
method.
I was curios if there are any translations for the getter method as well.