Hi all,

I'm trying to create a simple, automatic slideshow by combining the
Cycle plugin and the Thicbox plugin. With the cycle plugin I can
easily convert a paragraph with images to a highlighy configurable
automatic slideshow, which I want to open in a thickbox. Markup is as
follows:

<p id="slideshow">
  <img src="img1.png">
  <img src="img2.png">
  <img src="img3.png">
  <img src="img4.png">
</p>

Here's what I've come up with so far:

$(document).ready(function() {

  // wrap the slideshow and add pager
  $('#slideshow')
  .wrap('<div id="wrapper">')
  .before('<div id="nav">')
  .cycle({
      pager:  '#nav'
  });

  // hide the wrapper
  $('#wrapper').hide();

  // create a link to start the slideshow in a thickbox
  $('<p><a href="#TB_inline?height=600&width=800&inlineId=wrapper"
class="thickbox">Start slideshow</a></p>')
  .insertAfter('#wrapper');

  // Initialise thickbox
  tb_init('a.thickbox');

});

However, the cycle plugin doesn't seem to work inside the thickbox,
eg. the pager doesn't work and the slides don't automatically change.
Anybody got an idea on how to solve this? Thanks!

Regards,
Jeroen Coumans

Reply via email to