animate left/right textlist scrolling
This commit is contained in:
parent
6cd64efeb2
commit
2d98dfe754
1 changed files with 6 additions and 4 deletions
|
@ -61,12 +61,14 @@ Ox.TextList = function(options, self) {
|
||||||
.addClass('OxTextList')
|
.addClass('OxTextList')
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
key_left: function() {
|
key_left: function() {
|
||||||
var $element = that.$body.$element;
|
var $element = that.$body.$element,
|
||||||
$element[0].scrollLeft = $element[0].scrollLeft - $element.width();
|
scrollLeft = $element[0].scrollLeft - $element.width();
|
||||||
|
$element.animate({scrollLeft: scrollLeft}, 250);
|
||||||
},
|
},
|
||||||
key_right: function() {
|
key_right: function() {
|
||||||
var $element = that.$body.$element;
|
var $element = that.$body.$element,
|
||||||
$element[0].scrollLeft = $element[0].scrollLeft + $element.width();
|
scrollLeft = $element[0].scrollLeft + $element.width();
|
||||||
|
$element.animate({scrollLeft: scrollLeft}, 250);
|
||||||
},
|
},
|
||||||
keys: find
|
keys: find
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue