wmh/jquery-scrollbox

Reinitialize scroller after changing elements

Closed this issue · 9 comments

doze commented

How can I reinitialize the scroller after I change the elements in the ul list? Currently if I just call scrollbox again the timers etc. keep firing in the initial scrollbox..

wmh commented

What do you mean by reinitialize the scroller? And what kind of change did you make?

doze commented

Well I first run scrollbox when there are certain images in the ul list.. Then else where in the code I swap the images to some other images and need to reinitialize / reload the scrollbox so that it notices the new images. If I just call scrollbox again, it collects the new images but the scrolling speed increases also as the other timer from the first call keeps running.

wmh commented

You should try the queue container, it's already been fixed few days ago. Here's a demo for this feature: http://wmh.github.io/jquery-scrollbox/#demo6

doze commented

Here's what I'm trying to do:

http://jsfiddle.net/KPDMZ/

And now it seems to work.. :)

Earlier when I tried it, it didn't pickup the new elements from the list when they were changed, but now all is ok... So I guess I don't have any problems after all.

doze commented

Any idea why the scroller in the above fiddle isn't working in chrome but is in firefox?

wmh commented

Good job 👍 It works well in my Chrome 29.0.1547.76 m. Have you encountered any problem in chrome?

doze commented

The above fiddle doesn't start scrolling for me in Chrome when I click the init button.

It starts ok in Firefox 23.0.1 and IE10, but for me the scrolling doesnt start in Chrome (same version as yours 29.0.1547.76 m).

In Chrome, when I click the init button, it just places the numbers to the ul list, but the scroller doesn't start scrolling... odd...

wmh commented

Did you see any error message in Chrome console? I have no idea why it doesn't work.

doze commented

Worked for me in Chrome on another computer, must be something odd going on with the other installation, this issue can be closed.