forked from 0x2620/oxjs
use base 10 in parseInt, use Math.floor for numbers
This commit is contained in:
parent
79bb322112
commit
8bc8c57373
19 changed files with 44 additions and 45 deletions
|
|
@ -414,7 +414,7 @@ Ox.Menu = function(options, self) {
|
|||
function scrollMenu(speed) {
|
||||
var containerHeight = that.$container.height(),
|
||||
contentHeight = that.$content.height(),
|
||||
top = parseInt(that.$content.css('top')) || 0,
|
||||
top = parseInt(that.$content.css('top'), 10) || 0,
|
||||
min = containerHeight - contentHeight + self.itemHeight,
|
||||
max = 0;
|
||||
top += speed * self.scrollSpeed * -self.itemHeight;
|
||||
|
|
@ -516,7 +516,7 @@ Ox.Menu = function(options, self) {
|
|||
that.$container.height(that.$container.height() + self.itemHeight);
|
||||
} else {
|
||||
that.$content.css({
|
||||
top: ((parseInt(that.$content.css('top')) || 0) - offset) + 'px'
|
||||
top: ((parseInt(that.$content.css('top'), 10) || 0) - offset) + 'px'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -546,7 +546,7 @@ Ox.Menu = function(options, self) {
|
|||
that.$container.height(that.$container.height() + self.itemHeight);
|
||||
}
|
||||
that.$content.css({
|
||||
top: ((parseInt(that.$content.css('top')) || 0) - offset) + 'px'
|
||||
top: ((parseInt(that.$content.css('top'), 10) || 0) - offset) + 'px'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue