javascript - How to dynamically insert css vendor prefixes using jquery -


recently have been working css3 , animations. use following code @ 1 point:

$(".container").css('-webkit-transform', 'translate(200px,200px)'); 

now of wondering why dont use class above , toggle it.

well thing calculations , obtain 200px,200px , replace 200px,200px variable (i used 200px,200px example)

any ideas on can do

if i'm understanding question, want use variables translation outlined in above code. if have variables like:

var x = 200, y = 200; 

you should able insert them translation string cutting , catenating them together. might like:

$(".container").css('-webkit-transform', 'translate('+x+'px,'+y+'px)'); 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -