javascript - trigger click? autoload lightbox -


i don't understand jquery, i'm using lightbox here , want first photo open when page loads.

when used fancybox before, trigger click , work

$(document).ready(function() {     $(".fancybox").fancybox({     });     // launch fancybox on first element     $(".fancybox").eq(0).trigger('click'); }); 

so tried same thing lightgallery

$(document).ready(function() {     $("#lightgallery").lightgallery({     });      $("#lightgallery").eq(0).trigger("click"); }); 

but doesn't work

the whole thing here (i'm sure it's huge mess, i'm kind of fumbling way through it).

i tried few different solutions on here (window.load 1 think) don't understand enough know whether solution isn't working or i'm missing '{' or stupid thing

$('#lightgallery img:eq(0)').click() should it.


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -