Try using the "reset" and "add" methods of jCarousel instead of manipulating the contents of the list directly (with jQuery's "html" method) within your buildContent function.
Main Topics
Browse All TopicsHi all,
When my site first loads shows jCarousel with two images.
In the site I have three links, clicking link 1 makes jCarousel to show 12 images, clicking link 2 shows 2 images and link 3 shows 7.
The problem:
The width of the <ul> element is the one to fit the 2 initial images. So if I click link 1 instead of 12 images, I get to see just 2.
The same for link 3, instead of 7 images I see 2.
The carousel is set to show 6 images at the time.
So if the width of one element is 127px, I do the multiplication and I apply it to the <ul> via jquery's css, I get to see just 6 images for link 1 and link 3 because next button is disabled (the next button is not enabled as it still "thinks" that there are just two images in the carousel as when the site loaded for the first time).
Questions:
Is the approach of adding the width to the <ul> element via jquery correct? If so how can I enable the next button for when there's more than 6 images?
I've been able to enable the next button by adding mycarousel_nextItemCallbac
function mycarousel_nextItemCallbac
{
jQuery(".jcarousel-next").
jQuery(".jcarousel-next").
jQuery(".jcarousel-next").
}
If the previous approach is not correct, what can I do to fix this width issue? Please help, I'm clueless.
Please take into account that the number of images that the links/first load show will change dynamically (feed dynamically by webservice calls), so hardcoded fixes with numberOfElements won't do :(
Here the link:
http://www.vt-psoe.com/2.h
And the code with absolute paths is below.
Thanks a lot!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Thanks a ton Kravimir!!
Almost there!!
It's just a tiny thing that I'm missing.
Link 1 is loading its 12 images, Link 3 its seven images but it's Link 2 the one creating the trouble.
Please go to:
http://www.vt-psoe.com/3.h
click on Link 1 or Link 3, you will see them behaving great, but when you click on Link 2, you will see its two images + 4 blank spaces.
Where are coming from this 4 blank extra spaces?
The new code is below
Thanks a million once again!
Business Accounts
Answer for Membership
by: Dada44Posted on 2009-11-06 at 00:18:32ID: 25757477
Hi again,
I didn't get an answer for my question, and I was wondering if I didn't explain myself properly or if it is that has no solution or it's too complicated.
Please guide me here, I need to solve the problem asap :(
Thanks once again!