You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Bug in jquery.scrollable Created Feb 19, 2009

This thread is solved

Views: 4557     Replies: 7     Last reply May 28, 2009  
You must login first before you can use this feature

rpitting

Posts: 1

Registered:
Feb 19, 2009

Bug in jquery.scrollable

Posted: Feb 19, 2009

There is a bug in jquery.scrollable.

In line 126, you calculate the left-property of the items-container using

var left = -(item.outerWidth(true) * i);

This will only work if you have items of the same width (height). In my case, the scrolling elements vary in width.

Instead, you should use the left position of the item to scroll to, that fixed it for me:

 var left = -(item.position().left);

Best wishes,

Reiner

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» Bug in jquery.scrollable

Posted: Feb 21, 2009

Reply to: Bug in jquery.scrollable, from rpitting
Scrollable is build so that the items have the same width. I (guess) this is documented there somewhere.

After you fix do you have a live demo of varying width items. I would be interested to know if it works properly and could be used in production.

Beaver6813
--Beaver http://www.beaversolutions.net

Posts: 5

Registered:
Aug 1, 2008

» » Bug in jquery.scrollable

Posted: Mar 23, 2009

Reply to: » Bug in jquery.scrollable, from tipiirai
var left = -(item.position().left);
Is confirmed to work at least in FF3, testing in other browsers. I'm using this on a current project and will post a demo link in a few days. But from what I can see this certainly solves the problem!

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» » » Bug in jquery.scrollable

Posted: Mar 24, 2009

Reply to: » » Bug in jquery.scrollable, from Beaver6813
ok. I'll be waiting for this. great.

rory.mcnicholl

Posts: 1

Registered:
Mar 24, 2009

» » » » Bug in jquery.scrollable

Posted: Mar 24, 2009

Reply to: » » » Bug in jquery.scrollable, from tipiirai
Changing line 129 to

var top = -(item.position().top);

seems to do the job for vertical scrolling.

And seems to work in Safari 4 as well as FF3.

Beaver6813
--Beaver http://www.beaversolutions.net

Posts: 5

Registered:
Aug 1, 2008

» » » » Bug in jquery.scrollable

Posted: Mar 25, 2009

Reply to: » » » Bug in jquery.scrollable, from tipiirai
As far as I can tell its working fine, I dont have an standalone demo as its part of a project I'm working on but you can see it working fine on the bottom bar athttp://www.fetchmp3.com/ Not quite the application you hand in mind when you created it ayy? :P

Hope that helps!

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» » » » » Bug in jquery.scrollable

Posted: Mar 26, 2009

Reply to: » » » » Bug in jquery.scrollable, from Beaver6813
nice looking site you have there.

I'll start focusing on these javascript tool issues after 3.1 is out.

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» » » » » » Bug in jquery.scrollable

Posted: May 28, 2009

Reply to: » » » » » Bug in jquery.scrollable, from tipiirai
your solution worked fine. this fix is on the next release of scrollable. should be out next week.