[SOLVED] change width horizontal sliding element

More
13 years 1 month ago - 13 years 1 month ago #12318 by eric@evn64.nl
Hi,

I've set up this module so it scrolls a list of 20+ articles horizontally from right to left.

When the articles are a fixed width, the width of the element that moves (the <ul> element) is set by the jquery.carousel.min.js script this way:

env.contentWidth=env.itemWidth*env.steps.count;

I've added a multiplier to this:

env.contentWidth=env.itemWidth*env.steps.count*2;

The problem is that I've changed the fixed width of the articles to autowidth, because the scrolling articles are only thumbnails of images, and these come in differnt widths.

It works great, and the <ul> element is twice as wide.
But the function for the next button is still based on 'number of articles' * 'width set in modulesettings' and it stops scrolling before it reaches the end.

Where in the javascript can I add this multiplier also so it scrolls completely to the end?

Rgds, Eric

Hi everybody. I've found a solution.

By using the same multiplier on the code: left:-(env.itemWidth*step*1.2)+"px"

Perhaps this is of use to someone els.

Rgds, Eric
Last edit: 13 years 1 month ago by eric@evn64.nl.

Please Log in to join the conversation.

Time to create page: 0.140 seconds
Powered by Kunena Forum