Why jQuery transit doesn't work on mobile?

186 Views Asked by At

I am using this syntax:

var slidesContainerElem = jQuery('.elementContainer');
var currSlideElem = jQuery('.element');
slidesContainerElem.transition({ x: -currSlideElem.position().left },750);

It works perfectly on desktop, but it fails on mobile. What am i doing wrong here?

1

There are 1 best solutions below

0
On

I've found out. I think someone may face the same problem. It's simple:

slidesContainerElem.transition({ x:-currSlideElem.position().left },750);

You have to remove the space between colon and minus sign