jquery - loading fancybox on page load + specific options of fancybox -
i know way trigger fancybox on page load simulate click of hidden link, problem seems click launches fancybox default options , not taking consideration options i've givem... instance:
$("a.albumphoto").fancybox({ 'transitionin' : 'elastic', 'transitionout' : 'elastic', 'speedin' : 600, 'speedout' : 200, 'modal' : true, 'onstart' : function(){} }); $("#albumphoto_1").fancybox().trigger('click');
i have links class albumphoto , first image id albumphoto_1, trigger automatically on page load shown above. first image not take options mentioned above:
'transitionin' : 'elastic', 'transitionout' : 'elastic', 'speedin' : 600, 'speedout' : 200, 'modal' : true, 'onstart' : function(){} know how can resolve this?
thanks in advance!
you try:
$("#albumphoto_1").trigger('click');
because code showed, you're calling plugin again without options.
hope helps. cheers
Comments
Post a Comment