1

I'm using this jquery plugin to use CSS transforms with the jquery CSS function:

http://www.zachstronaut.com/posts/2009/02/22/jquery-patch-css-transform.html

$('.element').css{ transform : 'translate(' + val + 'px,0)' };

The above code currently works, but I would like to be able to increment the value, like you can do, for example, with margin left:

$('.element').css{ marginLeft : '+=' + val };

Is there a way to use jquery to increment the css3 transform / translate property?

Thanks!

1 Answer 1

3

You can try to add css hook for translate and use

$('.element').css({ translate : '+=' + val });

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.