Hi, here’s the link : http://www.romeotovaradero.com/branches/sites/dev/
Here’s my frustrating problem. I implemented a static jQuery slider on my Wordpress page. On this same page I have the “Smooth Slider” plugin.
Everytime (or sometimes when…) the “Smooth Slider” (bottom animation) starts the static slider freezes and does not continue looping.
Does anyone know the solution to prevent this from happening? :injured:
Thanks and have a great weekend!
Alex
Yi_Sage
November 19, 2010, 7:13pm
2
js file path.
branches/sites/dev/wp-content/plugins/smooth-slider/js/stepcarousel.js?ver=2.3.2
Can you edit the file?
Yi_Sage
November 19, 2010, 7:05pm
3
Okay,
it takes me so much time.
I find out what wrong with it…
because the Smooth Slider has a bug about its animate callback function.
from its source code , i found that its animate callback function is ‘function () { config.onslideaction(this) }’;
and config.onslideaction code is.
config.onslideaction = (typeof config.onslide == "undefined") ? function () { } : function (beltobj) { jQuery(beltobj).stop(); config.onslide() } //attach custom "onslide" event handler
animate funcition code is
config.$belt.animate({ left: -endpoint + 'px' }, config.panelbehavior.speed, function () { config.onslideaction(this); })
this == config.$belt .
That mean’s , when the $belt animates end,the callback function will be called and if here is a onslide parameter, ‘jQuery(beltobj).stop();’ will be called…
When the element’s animation is end and called his stop function in the callback function,it will make a bug.
I’m sorry ,
i can’t express the bug reason clearly in English.
So that, don’t use the ‘jQuery(beltobj).stop();’ in ‘config.onslideaction’ .
So basically, what I need to do is delete the “jQuery(beltobj).stop();” statement and I should be good to go?
Yes I can.
Tell me which line number and the modification and I will reupload!
You rock!
Yi_Sage
November 19, 2010, 7:18pm
6
at line 284
delete the ‘jQuery(beltobj).stop();’ statement
or you can search ‘jQuery(beltobj).stop();’ in the file…
File has been updated. Looks like it’s not freezing anymore! Awesome! How did you manage to find this? I just started with jQuery so I had no clue about this. You just made my weekend a whole lot better!
Thanks Yi!
Yi_Sage
November 19, 2010, 7:30pm
8
I save your webpage on my computer(use chrome… Crlt + S),and change some code to debug. then after so much breakpoint, i find the reason .
if you have any question in jQuery,call me .
Wow! You’re awesome, seriously! There’s so many lines of codes!! Have a great weekend!