Search code examples
jqueryfancybox

for fancybox, how can I start the slideshow automatically?


there doesn't seem to be such an option, and I haven't figured out how to modify the source for this purpose. can anyone help me?


Solution

  • I wanted to automatically display a gallery when the page load. I found the solution, it's just as simple as this:

    $.fancybox.open($("[rel='your_rel']").get(), options);
    

    This assumed you set the rel attribute of the items in the gallery to 'your_rel'.