-2

I'm looking for a way to rotate and flip image at the same time .i used this : to flip:

$('.images').css({
'-webkit-transform' : 'scaleX(-1)',
'-o-transform' : 'scaleX(-1)',
'-webkit-transform' : 'scaleX(-1)',
'transform' : 'scaleX(-1)',
'filter':'FlipH'});  

to rotate :

$('.images').css({
'-webkit-transform' : 'rotate('+-ui.value+'deg)',
'-o-transform' : 'rotate('+-ui.value+'deg)',
'-moz-transform' : 'rotate('+-ui.value+'deg)',
'-ms-transform' : 'rotate('+-ui.value+'deg)',                           
'transform' :'rotate('+-ui.value+'deg)'      

             });

I want to keep image flipping while rotate , can someone Help , thank you all.

user3868840
  • 371
  • 1
  • 3
  • 4
  • Please be more precise and void just to copy/paste code. thanks – Abderrazak BOUADMA Jan 05 '15 at 16:18
  • The two codes above work fine . the first one to flip image , the second to rotate image . what i want is : when image is flipped ; i want to rotate it and keeping it flipped . with a slider . and "ui.value" is a slider variable that change from 0 to 360 Degree . Thanx – user3868840 Jan 05 '15 at 16:28

1 Answers1

0

Just combine them

$('.images').css({
        '-webkit-transform' : 'rotate('+-ui.value +'deg)' + 'scaleX(-1)',
        '-o-transform' : 'rotate('+-ui.value +'deg)' + 'scaleX(-1)',
        '-moz-transform' : 'rotate('+-ui.value +'deg)' + 'scaleX(-1)',
        '-ms-transform' : 'rotate('+-ui.value +'deg)' + 'scaleX(-1)',                           
        'transform' :'rotate('+-ui.value +'deg)' + 'scaleX(-1)'     
});
NHNick603
  • 124
  • 5