Reputation: 17522
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;
Upvotes: 13
Views: 17357
Reputation: 34632
Because jQuery is designed with cross-browser compatibility in mind, as long as the CSS opacity tag is supported in a browser, then, yes, your jQuery code is cross-browser. (Have you tried it out yet? You can head to jsfiddle.net to see if it is.)
For more information, here is the W3Schools page on opacity. Head there with various browsers and see if it works. (It looks like it works for me in all three major browsers.)
Upvotes: 0