更改幻灯片时更新网址

时间:2014-08-05 08:58:30

标签: url slide

我在这个网站http://tympanus.net/codrops/2014/06/26/draggable-dual-view-slideshow/

上安装了这个很酷的演示http://wedding.halocommunication.com

我尝试做的事情,但没有成功,就是在幻灯片更改时更新网址(就像在此网站中的wild.as一样)。

此演示使用dragdealer插件skidding.github.io/dragdealer

我的一个实验是在此函数的末尾添加此行,但会生成错误

/** * DragDealer plugin callback: update current value */ DragSlideshow.prototype._navigate = function( x, y ) { // add class "current" to the current slide / remove that same class from the old current slide classie.remove( this.slides[ this.current || 0 ], 'current' ); this.current = this.dd.getStep()[0] - 1; classie.add( this.slides[ this.current ], 'current' ); window.location.href = 'http://test.com/' + this.slides.attr('data-content'); }

任何人都可以帮我提一些提示吗? 谢谢

0 个答案:

没有答案