Redtopia
Redtopia

Reputation: 5237

jQuery animate (slide left) on iPad... how can I improve performance?

I am using:

$('selector').animate({marginLeft:'-500px'},600);

... to slide a div to the left. Based on my current HTML/CSS, applying a negative margin works and I want to avoid having to rebuild my HTML/CSS to do it another way. My code works great on all browsers, but it's really choppy on a brand new iPad mini. Is there a better way achieve this effect specific to Safari on iOS?

Upvotes: 0

Views: 1993

Answers (1)

Jens Vesti
Jens Vesti

Reputation: 375

Try out css transitions instead. http://www.w3schools.com/css3/css3_transitions.asp

Should be possible with minor changes :)

Upvotes: 1

Related Questions