Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这个灯箱看起来很可爱,
http://dev7studios.com/nivo-lightbox/#/demos
但我需要灯箱在页面加载时启动。
在页面上添加元素后,将以下内容添加到
<script> $(document).ready(function(){ $('a').nivoLightbox(); }); </script>
这应该在页面加载时激活锚 () 上的灯箱。
要打开已打开图像的页面,
$( "a.firstImage" ).trigger( "click" );
参考:http ://dev7studios.com/nivo-lightbox/#/documentation