0

I am using jcarousel on a page in 3 different sections. I initially show the first section and hide the other two with display: none.

I have done some googling and found this is a common problem because anything that has a display of none automatically has a width of 0 and hence jcarousel cannot set it up properly.

I found this post on SO: Hide a jCarousel when page loads

That deals with it by putting the content you don't wanna show just yet by moving it off the page, I could do that, but was wondering, would that be bad for SEO purposes? As in Google wouldn't like the content being outside of the page?

Do I have any other options?

Community
  • 1
  • 1
Brett
  • 19,449
  • 54
  • 157
  • 290
  • 1
    hate to be that guy who questions a question, but why don't you just set the width of the elements in CSS? Or does the script still break? – totallyNotLizards Jun 11 '12 at 10:23

1 Answers1

1

Ok, I fixed my issue by letting the content load first and then once all the page data was loaded I ran a function to hide the relative content.

Code in header.. this runs the hideHomeCats function once everything on the page has been loaded.

$(window).load(hideHomeCats);

Where hideHomeCats is a function that hides the relevant content.

Hope this helps someone else. :)

Brett
  • 19,449
  • 54
  • 157
  • 290