我正在使用Squarespace并具有幻灯片显示,我需要以编程方式更改幻灯片。我正在尝试通过编写访问YUI模块然后运行此函数的函数来做到这一点:
next: function() {
this._slideshow.nextSlide()
},
完整代码:
YUI.add("squarespace-widgets-lightbox2", function(e) {
e.namespace("Squarespace.Widgets"),
e.Squarespace.Widgets.Lightbox2 = e.Squarespace.Lightbox2 = e.Base.create("Lightbox2", e.Squarespace.Widgets.Gismo, [], {
initializer: function() {
e.config.win.ACTIVE_LIGHTBOX = this,
this._overlay = new e.Squarespace.Lightbox2Overlay({
theme: this.get("theme")
}),
this._overlay.on("hide", this.hideAndDestroy, this),
this.bMobile = e.SQS.Gallery.Manager.isMobile(),
this.requestUpdateHeightAndRefresh = i(this.updateHeightAndRefresh.bind(this))
},
//removed irrelevant code for example
previous: function() {
this._slideshow.previousSlide()
},
next: function() {
this._slideshow.nextSlide()
},
如果有人能够提供帮助,我将永远感激不已!