简体   繁体   English

jQuery ::图像元素列表。 试图使它们成为幻灯片

[英]jQuery::List of image elements. Trying to make them into a slideshow

I managed to design a small 4x4 grid filled with images. 我设法设计了一个小的4x4网格,其中填充了图像。 Currently, I am styling the ul element using jQuery. 目前,我正在使用jQuery设计ul元素的样式。

<ul id="imagegrid">
  <li>
    <img src="...">
  </li>
  <li>
    <img src="...">
  </li>
</ul>

So, when I click an element inside this list it just zooms up and shows as a larger image. 因此,当我单击此列表内的元素时,它只会放大并显示为更大的图像。 Now, if I want to simulate a slideshow, how would I go about doing it? 现在,如果我要模拟幻灯片,我将如何去做? Is there a good way through jQuery? 是否有通过jQuery的好方法? (Using regular javascript, I was thinking of doing it using the setTimetout, but maybe jQuery does it better). (使用常规的javascript,我正在考虑使用setTimetout来实现,但是jQuery可能会做得更好)。

Why go to all this trouble re-inventing the wheel when there are plenty of plugins that people have already created to do this? 当人们已经创建了很多插件来执行此操作时,为什么还要花很多时间重新发明轮子呢? One that I can think of off the top of my head because I use it is the cycle plugin . 我可以想到的一个东西是循环插件,因为我用它了。 There are also lightbox plugins like fancybox that have slideshow options. 也有像fancybox这样的lightbox插件,带有幻灯片选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM