尝试让此.js灯箱在页面加载时显示

Trying to get this .js lightbox to display upon the load of the page

本文关键字:加载 显示 js      更新时间:2023-09-26

这个灯箱看起来很可爱,

http://dev7studios.com/nivo-lightbox/#/demos

但我需要灯箱在页面加载时启动。

在页面上添加元素后,将以下内容添加到

<script>
$(document).ready(function(){
    $('a').nivoLightbox();
});
</script>

这应该在页面加载时激活锚点 () 上的灯箱。

要打开已打开图像的页面,

$( "a.firstImage" ).trigger( "click" );

参考: http://dev7studios.com/nivo-lightbox/#/documentation