Jump to content

[Solved] Slide thumbs under product pic


Recommended Posts

Hi,

 

Under product pic there is #thumbs_list with all product image thumbnail.

 

There is also #view_scroll_right and left button that slide thumbs when clicked.

 

I want another button I have added to do the same but I don't know how. I have looked at product.js but it's very confusing.

 

There is only:

function serialScrollFixLock(event, targeted, scrolled, items, position)
{
	var serialScrollNbImages = $('#thumbs_list li:visible').length;
	var leftArrow = position == 0 ? true : false;
	var rightArrow = position + serialScrollNbImagesDisplayed >= serialScrollNbImages ? true : false;

	$('#view_scroll_left').css('cursor', leftArrow ? 'default' : 'pointer').css('display', leftArrow ? 'none' : 'block').fadeTo(0, leftArrow ? 0 : 1);
	$('#view_scroll_right').css('cursor', rightArrow ? 'default' : 'pointer').fadeTo(0, rightArrow ? 0 : 1).css('display', rightArrow ? 'none' : 'block');
	return true;
}
and

$('#thumbs_list').serialScroll({
			items:'li:visible',
			prev:'#view_scroll_left',
			next:'#view_scroll_right',
			axis:'x',
			offset:0,
			start:0,
			stop:true,
			onBefore:serialScrollFixLock,
			duration:700,
			lazy: true,
			lock: false,
			force:false,
			cycle:false
		});
Very confusing.

 

What function slides the thumbs? so that I can easily:

$('#mybutton').click(function(){
 SlideThumbs();
});
How could this be done easily?

 

Thanks!

Edited by rofli123 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...