Pages

Tuesday, July 26, 2011

jCarousel: No width/height set for items

PROBLEM: While loading, jCarousel popup alert with this error message:
"jCarousel: No width/height set for items. This will cause an infinite loop. Aborting..."
I would always get this error message every time the front page loads. I have been searching for a solution for many months and have finally found one.

SOLUTION: Not sure if this is really a solution or workaround, but it does the job of stopping the nagging popup box once and for all (while permitting jCarousel functionality).
  1. Open jquery.jcarousel.pack.js in the ../jcarousel/lib/ directory.
  2. Search for the word "alert" and you should find a snippet of code like this:
    Aborting|loop|infinite|an|cause|will|This|items|set|No|jCarousel|alert|class|
  3. Replace "alert" with "isNan":
    Aborting|loop|infinite|an|cause|will|This|items|set|No|jCarousel|isNan|class|
  4. Refresh the webpage that loads jCarousel and you should no longer get the infinite loop popup error!

No comments:

Post a Comment