B
B
Binarix2015-10-12 08:36:59
JavaScript
Binarix, 2015-10-12 08:36:59

How to apply transform in jQuery?

How can you apply a transform property with a variable part to a css class?
I do it like this

$('.container').css({transform : 'scale($resizerWidth)'});

but doesn't work.
I've tried escaping the variable with slashes, but it still doesn't work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Binarix, 2015-10-12
@Binarix

Oh I figured it out

$('.container').css({transform : 'scale('+ $resizerWidth +')'});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question