update SlidePanel

This commit is contained in:
rolux 2014-05-06 00:12:35 +02:00
parent 87771969b0
commit cdc95737e1

View file

@ -35,7 +35,7 @@ Ox.SlidePanel = function(options, self) {
return {
left: -Ox.getIndexById(self.options.elements, self.options.selected)
* self.options.size + 'px',
width: self.options.size + 'px'
width: self.elements * self.options.size + 'px'
};
}
@ -47,7 +47,9 @@ Ox.SlidePanel = function(options, self) {
}
function selectElement(id) {
self.$content.animate(getContentCSS(), self.options.animate);
self.$content.animate({
left: getContentCSS().left,
}, self.options.animate);
}
function updateElements() {