Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last li element bug (margin-top property) #4

Open
reuhno opened this issue Sep 21, 2011 · 2 comments
Open

Last li element bug (margin-top property) #4

reuhno opened this issue Sep 21, 2011 · 2 comments

Comments

@reuhno
Copy link

reuhno commented Sep 21, 2011

Hello, first sorry for my english ;)

The scroller works very well, but I saw a little bug on Chrome (14.0.835.186) and Safari (Version 5.1 (7534.48.3)) run on a Mac OsX Lion (10.7.1)

Indeed, when I run the page it works. Then I open a new tab, i stay on this tab (for 30 seconds or 1 minute). Then, when I go back to my page with "Totem", the last element stay with a margin Top negative ( margin-top:65px, in my case). The next interval fire, then the "new last li element" do the same thing, etc.

So, I did a modification that resolve my bug in the base.start_interval = function(){

I add the following lines before "base.$el.find('li:first').animate({...});" =
base.$el.find('li').clearQueue();
base.$el.find('li:not(:first)').css('marginTop','0');

I don't know if it's a good way, but it's works very well for me. I tried to reproduce the bug on your demo, but I can't, I don't know why ! :s

If you've got a better solution...

Have a good day..

@rpcjacobs
Copy link

Hi there,

I've implemented this plugin too, and noticed the same bug, although i didn't investigate it as much as the poster "laboiteare". I've been having this bug in Firefox 7.01, and changing the suggested lines actually fixes the problem.

In my case i use this plugin to scroll through a list of twitter tweets, which are outputted by seaofclouds tweet plugin (https://github.com/seaofclouds/tweet/) combined with a live() function with the create event (http://www.erichynds.com/jquery/jquery-create-event/) since the outputted tweets are inserted after the DOM is ready.

Thanks to laboiteare for his fix, it really works splendid. Hopefully the extra information is welcome. Thanks for a great plugin.

@riesart
Copy link

riesart commented Dec 10, 2011

Hi all,

I had the mentioned bug to. I implemented the solution provided by laboiteare and it solves the issue.

Thank laboiteare!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants