I use jCarouselLite to show a post-scroller that loads messages from a specific category. But I want to be able to switch a category through AJAX.
So, I load everything into a div, and then run:
jQuery(function($) { $("#serviceNews").jCarouselLite({ vertical: true, hoverPause:true, visible: 2, auto:2000, speed:1000 });
});
And it works ... until ajax updates innerHTML #serviceNews. Then jCarouselLite stops working. I tried using livequery:
jQuery(function($) { $("#serviceNews").livequery(function(){ $(this).jCarouselLite({ vertical: true, hoverPause:true, visible: 2, auto:2000, speed:1000 }); });
});
But the same thing is happening. I am not very familiar with jQuery, so I probably missed something obvious.
Here you can find a demo (middle column under the banner, with switchCategory buttons under the scroller).
source share