Browse Source

Merge pull request #424 from richsoni/master

Issue #423 - right sidebar push not working
pull/444/head
Jack Lukic 11 years ago
parent
commit
73ad74920b
1 changed files with 4 additions and 1 deletions
  1. 5
      src/modules/sidebar.js

5
src/modules/sidebar.js

@ -202,13 +202,15 @@ $.fn.sidebar = function(parameters) {
add: {
bodyCSS: function(direction, distance) {
var
invertDirection,
style
;
if(direction !== className.bottom) {
invertDirection = direction === 'right' ? -1 : 1;
style = ''
+ '<style title="' + namespace + '">'
+ 'body.pushed {'
+ ' margin-' + direction + ': ' + distance + 'px !important;'
+ ' margin-left: ' + invertDirection * distance + 'px !important;'
+ '}'
+ '</style>'
;
@ -218,6 +220,7 @@ $.fn.sidebar = function(parameters) {
}
},
remove: {
bodyCSS: function() {
module.debug('Removing body css styles', $style);

Loading…
Cancel
Save