Skip to content

Commit

Permalink
Don't use inline styles for height
Browse files Browse the repository at this point in the history
  • Loading branch information
lol768 committed Oct 10, 2018
1 parent 24b7761 commit 0aaa62f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jquery.doubleScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
contentElement: undefined, // Widest element, if not specified first child element will be used
scrollCss: {
'overflow-x': 'auto',
'overflow-y': 'hidden'
'overflow-y': 'hidden',
'height': '20px'
},
contentCss: {
'overflow-x': 'auto',
Expand All @@ -39,7 +40,7 @@
// do not modify
// internal stuff
$.extend(options, {
topScrollBarMarkup: '<div class="doubleScroll-scroll-wrapper" style="height: 20px;"><div class="doubleScroll-scroll" style="height: 20px;"></div></div>',
topScrollBarMarkup: '<div class="doubleScroll-scroll-wrapper"><div class="doubleScroll-scroll"></div></div>',
topScrollBarWrapperSelector: '.doubleScroll-scroll-wrapper',
topScrollBarInnerSelector: '.doubleScroll-scroll'
});
Expand All @@ -65,6 +66,7 @@

// apply the css
$topScrollBar.css(options.scrollCss);
$(options.topScrollBarInnerSelector).css("height", "20px");
$self.css(options.contentCss);

// bind upper scroll to bottom scroll
Expand Down

0 comments on commit 0aaa62f

Please sign in to comment.