fancybox auto load

Posted by dolomite on Stack Overflow See other posts from Stack Overflow or by dolomite
Published on 2010-06-03T18:29:51Z Indexed on 2010/06/03 18:34 UTC
Read the original article Hit count: 371

Filed under:
|
 <script type="text/javascript">
  $(document).ready(function() {
    $("a[rel=example_group]").fancybox({
    'transitionIn'  : 'none',
    'transitionOut'  : 'none',
    'titlePosition'  : 'over',
    'titleFormat'  : function(title, currentArray, currentIndex, currentOpts) {
     return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
    }
   });


   $("#lightbox_trigger").fancybox({
    'titlePosition'  : 'inside',
    'transitionIn'  : 'none',
    'transitionOut'  : 'none'
   });

  });

 jQuery(document).ready(function() {
    $("#lightbox_trigger").trigger('click');
});

that works fine, the click event triggers the lightbox..but what if I remove the link with the id #lightbox_trigger?

Basically what I want it the lightbox to load without the click event and link..

anyone?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about lightbox