$(this).css({ -webkit-transform:'rotate(180deg)', -moz-transform: 'rotate(180deg)', -o-transform: 'rotate(180deg)', -ms-transform: 'rotate(180deg)' });
This is throwing the error:
Uncaught SyntaxError: Unexpected token -
I'm really hoping I don't have to install the jQuery Rotation plugin just for this one instance.
You can use the css method to change a CSS property (or multiple properties if necessary): $("#business"). click(function(event){ jQuery. fx.
The term 'webkit' is used in the CSS syntax for rendering content in Safari and Chrome browsers. Webkit code may need to be added in CSS to ensure it renders correctly on Chrome and Safari due to the lack of cross-compatibility.
The jQuery css() method is used to get the computed value of a CSS property or set one or more CSS properties for the selected elements.
WebKit extensions are proprietary CSS properties that are designed to work on browsers that are powered by the WebKit browser engine, such as Apple Safari and Google Chrome. WebKit is an open source framework.
$(this).css({ '-webkit-transform':'rotate(180deg)', '-moz-transform': 'rotate(180deg)', '-o-transform': 'rotate(180deg)', '-ms-transform': 'rotate(180deg)' });
Quote them:
$(this).css({ '-webkit-transform': 'rotate(180deg)', '-moz-transform': 'rotate(180deg)', '-o-transform': 'rotate(180deg)', '-ms-transform': 'rotate(180deg)' });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With