Link to home
Start Free TrialLog in
Avatar of John Carney
John CarneyFlag for United States of America

asked on

Modifying the amount of horizontal travel in a dynamic ajax carousel.

Please take a look at this question which has already been answered : https://www.experts-exchange.com/questions/24136005/Creating-a-text-file-with-images-for-a-dynamic-ajax-carousel.html?anchorAnswerId=23619574#a23619574

Can you tell me what part of what code determines the number of images that are moved over with every click? The default is to three. What line of code (in what file) would I modify to make that 2 images per click or one image? I thought I might find it in the ajax text file, but I couldn't. And the jquery files are a little overwhelmong for me at this point.

Thanks!
John
Avatar of ali_pakkan
ali_pakkan
Flag of Türkiye image

For the example on "http://sorgalla.com/projects/jcarousel/examples/dynamic_ajax.html"..

You can change the behaviour playing with "width" attributes in the following styles:

jcarousel-container-horizontal
jcarousel-clip-horizontal

on

http://sorgalla.com/projects/jcarousel/skins/ie7/skin.css
Avatar of John Carney

ASKER

Unfortunately doing that just changes the width of the container or the clip. I want the container and clip to have the same width, i just want to know how to move the clip by one or two pictures instead ofthree.
In other words as it is now, when the page loads you see three images, 1, 2, and 3. When you click on the right arrow, all three shift to the left and now we see images 4, 5, and 6.
I want to know what line of code to change so that when we click the arrow, we see images 3, 4, and 5  or  images 2, 3 , and 4.
Thanks,
John
SOLUTION
Avatar of sosamv
sosamv

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sosamv
sosamv

ups i've found it on http://sorgalla.com/projects/jcarousel/   LOL hehe, let me take a look ;)
sosamv's right.. on that site is the parameter you're looking for..

scroll (default:3):         The number of items to scroll by.

Tried with that one, but thats the number of items it scrolls per click, but the same 3 items are showing :S
I don't have a zip utility that works right now, but you can download all the active files from the html: http://www.discretedata.com/JCRD/Carousels/dynamicAjaxJC1.html. Please take a look and let me know if you can see where to make the change from 3 slides to 2 or 1.
Thanks. -John
I couldn't figure out which file had the scroll (default:3) in it, although it sounds like that doesn't work anyway.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What file is that in? I couldn't find it in my html.
 
Okay I can see where that fits in now, but what was making it default to 3 in the first place?
In other words which file contains the line <  scroll (default:3):  >? I can see from sosamv's link that you can set the scroll number in the Configuration file, but where is that file vis a vis my version of the carousel?
Thanks,
John
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks! Out of curiosity, what's the exact link of the unpacked version that you downloaded? I found a great unpacking utiility online, but the var defaults still came out in one long string. Yours has the standard js formatting, so I'm just curious ...
In any event the unpacking utility is here: http://matthewfl.com/unPacker.html
Before your last post I had no idea what packing was, so thanks!
-John
 
 
 
the unpacked version in within the same zip file you downloaded hehe i tried making the change by myself and changing the variable scroll: 3 to scroll: 1, will only change the number of images scrolled per click :S i thought that wasnt what you wanted hehe anyway, hope you got it working, byeee
It's good to hear that everything is OK.

http://sorgalla.com/projects/jcarousel/
Download jcarousel.zip
jcarousel/lib/jquery.jcarousel.js