jcarousel not getting drawn inside a hidden div

Posted by zoom_pat277 on Stack Overflow See other posts from Stack Overflow or by zoom_pat277
Published on 2010-04-28T16:30:08Z Indexed on 2010/04/28 16:33 UTC
Read the original article Hit count: 372

Filed under:
|
|
|

I am struggling since hrs on this one now.

I am using a div to populate a ul/li list and then draw a jcarousel out of it. So this works fine

      $('#mycarousel').jcarousel();

everything works fine as expected...

but here is the scenario. the div inside which I have ul/li items could be hidden by the click of another button. When the div is hidden, and I resize the browser window...the jcaraousel also attempts to redraw itself... but since it is hidden, it is not able to draw it properly. and everyting is jumbled up in the list (if I click the button again to make it visible)... but again if I resize the window now (the jumbled up jcarousel is NOT hidden now)... it redraws itself correctly...

I was wondering to get hold of the jcarousel instance and reload itself as soon as the button is clicked to make the div visible (the way it resizes itself when it is visible and window is resized)

to get hold of the jcarousel.. I am using

   JQuery('#mycarousel').data('jcarousel') and it is returned as null.

Anybody has any idea on this one>?

© Stack Overflow or respective owner

Related posts about jcarousel

Related posts about hidden