1

我想使用名为“jCarousel Lite”(http://www.gmarwaha.com/jquery/jcarousellite/)的 jQuery 插件构建一个轮播幻灯片。我已经启动并运行了。诀窍是,我还想构建一个 YouTube 式的“展开”按钮,它可以将幻灯片放大以填满页面的整个宽度。

到目前为止,使用 jQuery,我已经设法构建了这样一个展开按钮。问题是,“下一个”和“上一个”按钮仍然只能滑动轮播第一次初始化时定义的距离。显然,这些需要滑动更长的距离,现在宽度更宽了。

所以基本上我需要的是关于如何在轮播首次初始化后更改“下一个”和“上一个”按钮滑动距离的信息。

4

1 回答 1

1

So, I may have found a semi-solution to my "expand" problem.

Reinitializing the slideshow didn't work. I couldn't find (or hook in to) the variable that defines how far each slide travels on each next/prev click.

So my solution was to embed the slideshow at its expanded size, but with smaller images inside. On clicking my expand button, I didn't expand the slideshow itself, only the items inside. Combine this with a containing div which was set to the small width and overflow: hidden, things worked almost perfectly.

于 2010-08-25T14:45:46.260 回答