Skip to content

Commit 3c3a441

Browse files
authored
Merge pull request #43 from mikejacobson/bs4-mobile
Add small device support when using Bootstrap 4
2 parents f722800 + f279523 commit 3c3a441

11 files changed

+28
-13
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jquery-bootstrap-scrolling-tabs",
3-
"version": "2.1.1",
3+
"version": "2.2.1",
44
"main": [
55
"./dist/jquery.scrolling-tabs.js",
66
"./dist/jquery.scrolling-tabs.css"

dist/jquery.scrolling-tabs.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jquery-bootstrap-scrolling-tabs
3-
* @version v2.1.1
3+
* @version v2.2.1
44
* @link https://github.com/mikejacobson/jquery-bootstrap-scrolling-tabs
55
* @author Mike Jacobson <[email protected]>
66
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -13,6 +13,10 @@
1313
.scrtabs-tab-container .tab-content {
1414
clear: left; }
1515

16+
.scrtabs-tab-container.scrtabs-bootstrap4 .scrtabs-tabs-movable-container > .navbar-nav {
17+
-ms-flex-direction: row;
18+
flex-direction: row; }
19+
1620
.scrtabs-tabs-fixed-container {
1721
float: left;
1822
height: 42px;

dist/jquery.scrolling-tabs.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jquery-bootstrap-scrolling-tabs
3-
* @version v2.1.1
3+
* @version v2.2.1
44
* @link https://github.com/mikejacobson/jquery-bootstrap-scrolling-tabs
55
* @author Mike Jacobson <[email protected]>
66
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -248,6 +248,7 @@
248248
DATA_KEY_IS_MOUSEDOWN: 'scrtabsismousedown',
249249

250250
CSS_CLASSES: {
251+
BOOTSTRAP4: 'scrtabs-bootstrap4',
251252
RTL: 'scrtabs-rtl',
252253
SCROLL_ARROW_DISABLE: 'scrtabs-disable'
253254
},
@@ -434,6 +435,10 @@
434435
$tabsContainer.addClass(CONSTANTS.CSS_CLASSES.RTL);
435436
}
436437

438+
if (stc.usingBootstrap4) {
439+
$tabsContainer.addClass(CONSTANTS.CSS_CLASSES.BOOTSTRAP4);
440+
}
441+
437442
stc.$fixedContainer = $tabsContainer.find('.scrtabs-tabs-fixed-container');
438443
$leftArrow = stc.$fixedContainer.prev();
439444
$rightArrow = stc.$fixedContainer.next();
@@ -941,8 +946,6 @@
941946
minPos = smv.getMinPos(),
942947
leftOrRightVal;
943948

944-
var leftOrRight = stc.rtl ? 'right' : 'left';
945-
946949
if (stc.movableContainerLeftPos > 0) {
947950
stc.movableContainerLeftPos = 0;
948951
} else if (stc.movableContainerLeftPos < minPos) {

dist/jquery.scrolling-tabs.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jquery.scrolling-tabs.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jquery-bootstrap-scrolling-tabs",
3-
"version": "2.1.1",
3+
"version": "2.2.1",
44
"description": "jQuery plugin for scrollable Bootstrap Tabs",
55
"homepage": "https://github.com/mikejacobson/jquery-bootstrap-scrolling-tabs",
66
"bugs": "https://github.com/mikejacobson/jquery-bootstrap-scrolling-tabs/issues",

src/js/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ var CONSTANTS = {
1010
DATA_KEY_IS_MOUSEDOWN: 'scrtabsismousedown',
1111

1212
CSS_CLASSES: {
13+
BOOTSTRAP4: 'scrtabs-bootstrap4',
1314
RTL: 'scrtabs-rtl',
1415
SCROLL_ARROW_DISABLE: 'scrtabs-disable'
1516
},

src/js/elementsHandler.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ function ElementsHandler(scrollingTabsControl) {
130130
$tabsContainer.addClass(CONSTANTS.CSS_CLASSES.RTL);
131131
}
132132

133+
if (stc.usingBootstrap4) {
134+
$tabsContainer.addClass(CONSTANTS.CSS_CLASSES.BOOTSTRAP4);
135+
}
136+
133137
stc.$fixedContainer = $tabsContainer.find('.scrtabs-tabs-fixed-container');
134138
$leftArrow = stc.$fixedContainer.prev();
135139
$rightArrow = stc.$fixedContainer.next();

src/js/header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* jquery-bootstrap-scrolling-tabs
3-
* @version v2.1.1
3+
* @version v2.2.1
44
* @link https://github.com/mikejacobson/jquery-bootstrap-scrolling-tabs
55
* @author Mike Jacobson <[email protected]>
66
* @license MIT License, http://www.opensource.org/licenses/MIT

src/js/scrollMovement.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,6 @@ function ScrollMovement(scrollingTabsControl) {
277277
minPos = smv.getMinPos(),
278278
leftOrRightVal;
279279

280-
var leftOrRight = stc.rtl ? 'right' : 'left';
281-
282280
if (stc.movableContainerLeftPos > 0) {
283281
stc.movableContainerLeftPos = 0;
284282
} else if (stc.movableContainerLeftPos < minPos) {

0 commit comments

Comments
 (0)