You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@ There are also some optional features available:
29
29
*[Support Adding Tabs Dynamically After Page Load](#ft1)
30
30
*[Force Scroll to Tab Edge](#ft2)
31
31
*[Force Refresh of Tab Container](#refreshOn)
32
+
*[Enable Horizontal Swiping for Touch Screens](#allowScrollbar)
32
33
33
34
34
35
@@ -257,6 +258,34 @@ function forceARefresh() {
257
258
258
259
```
259
260
261
+
#### <aid="allowScrollbar"></a>Enable Horizontal Swiping for Touch Screens
262
+
263
+
To enable horizontal swiping for touch screens, you need to enable horizontal scrolling—and therefore the horizontal scrollbar—for the tabs. For WebKit-based browsers, the scrollbar can then be hidden via CSS, but for browsers that don't support `::-webkit-scrollbar` (see [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/::-webkit-scrollbar) for details), the scrollbar will be visible (which is what this directive was originally built to prevent).
264
+
265
+
So if you only need to support WebKit-based browsers, here's how to enable swiping:
266
+
267
+
Add CSS class `scrtabs-allow-scrollbar` to the directive element or any ancestor of the directive element. As long as the tabs fixed container (`.scrtabs-tabs-fixed-container`) is a descendent of that class, it will work.
268
+
269
+
For example:
270
+
```html
271
+
<!-- Replace ul.nav-tabs with scrolling-tabs element directive -->
0 commit comments