how to apply transform rotate all browse in inline css using jquery


Tags: jquery,css

Problem :

I use,

jQuery('.active').css(
           'transform',
           'rotate('+angle+'deg)',
           '-webkit-transform',
           'rotate('+angle+'deg)',
           '-moz-transform',
           'rotate('+angle+'deg)'
); 

but not a work in other browser.

Can Anyone help me?



Solution :

I would suggest to create a class with name like .active and then use .addClass method.

However take a look at the DEMO first.

Here is the jQuery Code

$('.active').css({ 
  'transform': 'rotate(-20deg)', 
  '-webkit-transform': 'rotate(-20deg)', 
  '-moz-transform': 'rotate(-20deg)',
  'margin-top':'5em'
});

    CSS Howto..

    show div border when link is clicked

    How to customize ionic style components (lists and tabs with different shapes)

    CSS menu - main option makes wider when submenu appears - how to fix it?

    Extra margin showing below element?

    How to hide div for specific height or width using CSS [duplicate]

    How to have two css animations in one tag

    How do I make the Android WebView not ignore the 'height' css property?

    How to align radio buttons with labels in one line? [duplicate]

    How to change scrollbar in textarea input?

    Does HTML5 DOCTYPE affect how CSS3 effects are rendered?

    How do I keep multiple DIVs the same height using jQuery?

    How to make IFrame fill width of screen

    How to make one circle inside of another using CSS

    JavaFX 8 - How to change the color of the prompt text of a NOT editable combobox via CSS?

    How to align text and image in xslt with css

    Hide/show block with CSS

    How do I add background color to just the width of centred text?

    How would use span to create different styles between selected characters and the rest?

    How to apply diffrent css style on different events of an asp button?

    How to remove a class as each image is loaded

    How to use resolution relative css files?

    How to use javascript to transition a property from a set attribute to a new attribute

    how to stop only the hover pointer event in css

    How do I float a
  • to the right in CSS?
  • How to fill in blank space using html and css

    How to apply css for min-width and print?

    How to stop jquery loop function by a click while starting another loop function

    How to fully stretch 2 embeded divs?

    How to display an image in the right upper corner of an input box

    how to save style-css values for Later use then Reload those values back