1
0
Fork 0
forked from 0x2620/oxjs

use base 10 in parseInt, use Math.floor for numbers

This commit is contained in:
rolux 2012-06-13 10:28:21 +02:00
commit 8bc8c57373
19 changed files with 44 additions and 45 deletions

View file

@ -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'
});
}
}