Mr. P
Mr. P

Reputation: 11

jQuery How to set CSS transform property to any object

I need to set transform ( transform: matrix(2, 0, 0, 4, -16, -160) ) css property using jquery. from that matrix(2, 0, 0, 4, -16, -160 ) i just need to modify second last value .. I am implementing zoom plugin in my application. If i swipe on image i should be able to get those tranform matrix values, manipulate the second last one and set back tranform matrix property. i am getting tranform values, i manipulated it to the value i want . Now i just need to set that tranform property back Anyone knows? Pls help.

Upvotes: 1

Views: 3121

Answers (1)

Maneesh Singh
Maneesh Singh

Reputation: 575

you can use as .

$("#yourselectorId").css({
    transform:" matrix(2, 0, 0, 4, -16, -160)"
});

Upvotes: 2

Related Questions