0

I read a lot about 'circular' wrap bugs in jcarousel, but didn't find this particular one. I have jcarousel with 'circular' wrap and I want to display some info about current slide when user hovers over slide and hide this info when mouse is out of slide. To achieve that I keep this info under <li> elements wrapped in a <div class="description">.

$('#carousel').jcarousel(
     auto: 3,
     wrap: 'circular',
     scroll:1,
     initCallback: mycarousel_initCallback,
     size:5
 });

and bind event (I also tried variant with live()) to <li> element (current and future that will appear during jcarousel working in 'circular' wrap):

$('#carousel').delegate(
                        'li',
                        'mouseover',
                        function (){
                            $(this).find('.description').slideDown();
                            return false;
                        }
                    );
                $('#carousel').delegate(
                        'li',
                        'mouseout',
                        function () {
                            $(this).find('.description').slideUp();
                            return false;
                        }
                    );

And this works fine, but at some point (completely undetermined for me, it may be first seconds of use or even minutes of hard tapping forward/backward) on occasional slides description stops to appear. I tried to debug this and found that events at this broken slides fires, dom elements with description exists, but slideDown()/slideUp() simply nothing do. And this slides keeps broken until page reloading.

For some reason I cannot change wrap to other and I cannot change jQuery from 1.3 (or 1.4, I dont actually remember) to more recent version. Any ideas ?

Dmitry Kankalovich
  • 553
  • 2
  • 8
  • 19

1 Answers1

0

Well, long story short: this issue is related to interactions between jQuery animation functionality and jCarousel. When slideshow has circullar wrap it at some point begin to create and delete new nodes which stands for slides. And deleting node when animation is not finished 'hangs' fx queue of jquery. To avoid this trouble I had to clear this queue before deleting slide. Looks like hack, but nothing better can be done as it seems to me.

Dmitry Kankalovich
  • 553
  • 2
  • 8
  • 19