0

我正在尝试查看此图像库的 javascript 代码是否可以作为单击图像以查看下一步的选项。目前,它仅设置为通过单击下一个/上一个按钮转到下一个图像。有什么想法吗?

来源: http ://threepointmotors.com/lytebox.js

示例: http ://threepointmotors.com/NewsandEvents/CurrentNews/2012/smartElectricDriveCollection/tabid/226/Default.aspx

4

1 回答 1

0

我看到你的页面已经包含了 jQuery 库,所以这应该是一件容易的事。

$('body').on('click', '#lbImage', function() { //when display image is clicked
    if ($('#lbNext2_Off').is(':hidden')) //check if it isn't the last image
        myLytebox.changeContent(myLytebox.activeSlide + 1); //move to next image
});
于 2012-07-26T23:28:03.450 回答