0
我正在使用jQuery Cycle在一个页面布局网站上切换内容。使用#hash/anchor显示jQuery循环幻灯片,不是数字
目前我已经更改了脚本,以便在URL中显示当前幻灯片(使收藏夹可以显示当前幻灯片)。
我也可以提醒正确的ID,但我无法得到它来激活幻灯片功能/效果。
$(window).bind('hashchange', function() { //detect hash change
var hash = window.location.hash.slice(1); //hash to string (= "myanchor")
alert(hash); //This Alerts the right ID/anchor of the current slide
//$('.slideshow').cycle(hash); // This doesn't work. If I use 1, 2, 3 etc. it shows the diffent slides
});
我该如何得到这个工作?我错过了什么吗?
预先感谢您。