Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

my jquery image slider isn't smooth in chrome but is fine in firefox and IE

So I have this really simple image slider this this page here http://charlesbergertattoos.com/tattoos which works just fine in IE and firefox. The animation is really smooth and the images actually slide, but in chrome it's not smooth at all.

like image 375
rugbert Avatar asked Apr 03 '12 14:04

rugbert


1 Answers

  • demo: http://jsbin.com/oruxip

because on click event your calling slider_animate() directly your not calling your plugin

in chrome when you do that the slide_widths var is 0 because you defined and executed the assignment logic outside of the event function so its static

you have 2 options put that line inside the function slider_animate

var slide_widths = $(e).find('.holder > li:first').width();  
//correct the variables name accordingly 

or call the plugin function itself which is imgSlider

like image 156
Nadeem Khedr Avatar answered Sep 23 '22 02:09

Nadeem Khedr