mirror of https://github.com/layui/layui
调整 carousel 的 `jump` 方法为 `goto`
parent
23202137e1
commit
235d9fd40f
|
@ -196,7 +196,7 @@ layui.define('jquery', function(exports){
|
||||||
};
|
};
|
||||||
|
|
||||||
// 跳转到特定下标
|
// 跳转到特定下标
|
||||||
Class.prototype.jump = function(index){
|
Class.prototype.goto = function(index){
|
||||||
var that = this;
|
var that = this;
|
||||||
var options = that.config;
|
var options = that.config;
|
||||||
|
|
||||||
|
@ -236,9 +236,9 @@ layui.define('jquery', function(exports){
|
||||||
tplInd.css('margin-top', -(tplInd.height()/2));
|
tplInd.css('margin-top', -(tplInd.height()/2));
|
||||||
}
|
}
|
||||||
|
|
||||||
//事件
|
// 事件
|
||||||
tplInd.find('li').on(options.trigger === 'hover' ? 'mouseover' : options.trigger, function(){
|
tplInd.find('li').on(options.trigger === 'hover' ? 'mouseover' : options.trigger, function(){
|
||||||
that.jump($(this).index());
|
that.goto($(this).index());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue