【发布时间】:2013-05-03 20:42:26
【问题描述】:
我正在使用这个:
$(function() {
// initialize scrollable
window.api = $("div.scrollable").scrollable({
clickable: true,
activeClass: "active",
onSeek: function() {
alert("current position is: " + this.getIndex());
//remove highlighting from all images
$(".items img").removeClass("selected");
var position = this.getIndex().toString();
var thisItem = $(".items:nth-child(" + position + ")");
//var thisItem = allItems(this.getIndex);
alert("item is: " + $(this).attr('alt'));
changeimage($(".items:nth-child(2)"));
}
}).circular().autoscroll({
interval: 4000,
api: true,
autoplay: false,
steps: 1
});
});
(只是测试)以便我可以将当前项目解析为我的 changeimage() 函数 但是我收到的所有警报都是未定义的。 我需要在这里做什么才能获得当前项目
【问题讨论】:
标签: jquery-selectors jquery-scrollable