我在一个页面上有多个滚动条。
我使用下面的代码来创建它们:
var swipes = [];
$('.slider').each(function(i, obj) {
swipes[i] = new Swipe(obj);
});问题是我如何访问可选的第二个参数,例如。
continuous: true,
callback: function(index, elem) {},
transitionEnd: function(index, elem) {}谢谢
发布于 2013-09-17 18:24:49
swipesi.parameterName = desiredParameterValue;
发布于 2013-11-10 18:16:19
希望我的回答仍然是相关的。下面的代码应该可以工作:
var swipes = [];
$('.slider').each(function(i, obj) {
swipes[i] = new Swipe(obj, {
continuous: true,
callback: function(index, elem) {},
transitionEnd: function(index, elem) {}
});
});https://stackoverflow.com/questions/18150105
复制相似问题