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

Please take a look at this question which has already been answered :

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.

John CarneyReliability Business Tools Analyst IIAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

For the example on ""..

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


John CarneyReliability Business Tools Analyst IIAuthor Commented:
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.
Hi there! i think i'be found that variable you're looking for, please provide a zip file with all of the files from your project (all javascripts and example html). The main Javascript (../lib/jquery.jcarousel.pack.js) is compressed using a javascript compressor found on this link: 

thats the reason why its difficult to modify the script, if you post the files i can decrypt it using that same page and help you with the changes.

CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

ups i've found it on   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
John CarneyReliability Business Tools Analyst IIAuthor Commented:
I don't have a zip utility that works right now, but you can download all the active files from the 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.
scroll at that point:

jQuery(document).ready(function() {
        itemLoadCallback: mycarousel_itemLoadCallback,
        scroll: 1

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
John CarneyReliability Business Tools Analyst IIAuthor Commented:
What file is that in? I couldn't find it in my html.
John CarneyReliability Business Tools Analyst IIAuthor Commented:
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?
You mean the default value.. It must be in jquery.jcarousel.pack.js.. Yet, since it is packed, it'll not be easy to find it :)..

I downloaded the unpacked normal version and in that file, you can see it..

    // Default configuration properties.
    var defaults = {
        vertical: false,
        start: 1,
        offset: 1,
        size: null,
        scroll: 3,

Open in new window

John CarneyReliability Business Tools Analyst IIAuthor Commented:
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:
Before your last post I had no idea what packing was, so thanks!
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.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.