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

Your preferred username that is used when logging in.

Scrollable error when size = 2 Created Nov 19, 2009

This thread is solved

Views: 3383     Replies: 4     Last reply Aug 8, 2011  
You must login first before you can use this feature

edonaldson

Posts: 1

Registered:
Nov 19, 2009

Scrollable error when size = 2

Posted: Nov 19, 2009

I get the following error when I set the size: 2 on the .scrollable plugin:

"time is not defined"

The source looks like this:

if(t==2){if(u==k){u--}r.getItems().removeClass(s);v.addClass(s);return r.seekTo(u,time,fn)}

Sure enough, the "time" variable is not used any place else.

nosaku

Posts: 2

Registered:
Dec 14, 2009

» Scrollable error when size = 2

Posted: Dec 14, 2009

Reply to: Scrollable error when size = 2, from edonaldson
I am also having the same problem? Did you find any solution for this? In my site, I do not have place to display 5 items...so need to display only two at a time.

Regards,
Satish.

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» Scrollable error when size = 2

Posted: Dec 14, 2009

Reply to: Scrollable error when size = 2, from edonaldson
Good catch.

Line 284 in the unminified source should be:


return self.seekTo(i);

In context:


if(t==2){if(u==k){u--}r.getItems().removeClass(s);v.addClass(s);return r.seekTo(u)}

It's inside the click function, and the code should be:


click: function(i) {

	var item = self.getItems().eq(i), 
		 klass = conf.activeClass,
		 size = conf.size;			

	// check that i is sane
	if (i < 0 || i >= self.getSize()) { return self; }

	// size == 1							
	if (size == 1) {
		if (conf.loop) { return self.next(); }
		
		if (i === 0 || i == self.getSize() -1)  { 
			forward = (forward === undefined) ? true : !forward;	 
		}
		return forward === false  ? self.prev() : self.next(); 
	} 

	// size == 2
	if (size == 2) {
		if (i == index) { i--; }
		self.getItems().removeClass(klass);
		item.addClass(klass);					
		// return self.seekTo(i, time, fn);
		// in the above line 284 time becomes an implied global if at all
		// should be:
		return self.seekTo(i);
	}
        
        //...				

Odissey

Posts: 1

Registered:
Feb 21, 2010

» » Scrollable error when size = 2

Posted: Feb 21, 2010

Reply to: » Scrollable error when size = 2, from blacktrash
Thank you, saves time fo show