jquery opacity cross browser?

Val picture Val · Jan 11, 2011 · Viewed 17.3k times · Source

Is the the jQuery('#selector').css({'opacity':50}); cross browser?

The only reason i ask is because the line below that we'd normally use on css

-moz-opacity:.50; filter:alpha(opacity=50); opacity:.50;

Answer

davin picture davin · Jan 11, 2011

this is probably better:

$(element).fadeTo(0, 0.5);