"Responsive" demo

Text that will be inserted as the first slide:

Efficiently unleash cross-media information without cross-media value. Quickly maximize timely deliverables for real-time schemas. Dramatically maintain clicks-and-mortar solutions without functional solutions.

And the code to do it:


$('button.insert').on('click', function() {
  var curr = $.jCarouselLite.curr;
  var newSlide = '<li class="slide prepended">' +
      $('#to-prepend').html() +
      '</li>';

  // Insert the slide at the beginning
  $slideshow.children('ul').prepend(newSlide);

  // Trigger the refresh
  // with the second argument set to ['all']
  $slideshow.trigger('refreshCarousel', ['all']);
  
  // Now, since the slide was inserted *before* the current one,
  // we have to immediately adjust the carousel position
  // if we want it to remain at the same slide.
  //
  // Add 1 to the current position for the new slide,
  // and subtract 1 for *each* visible slide
  // (because the carousel is circular and
  // the plugin thus adds "padding" slides)
  
  $slideshow
  .trigger('go', [curr + 1 - 2, {speed: 0}]);
});
    

Text that will be inserted in a new slide after the first currently visible slide:

Completely synergize resource intensive relationships via premier niche markets. Professionally cultivate one-to-one customer service with robust ideas. Dynamically innovate resource-leveling customer service for state of the art customer service.

And the code to do it:


$('button.insert').on('click', function() {
  var curr = $.jCarouselLite.curr;
  var newSlide = '<li class="slide">' +
      $('#to-insert').html() +
      '</li>';

  // Insert the slide after the current slide
  $slideshow.find('li.slide').eq(curr)
  .after(newSlide);

  // Trigger the refresh
  // with the second argument set to ['all']
  
  $slideshow.trigger('refreshCarousel', ['all']);
});