Releases: mikejacobson/jquery-bootstrap-scrolling-tabs
Fix #65: Can't revisit tabs that were visited pre-init of scrollingTabs
This patch fixes an issue in which a tab clicked before you invoke the scrollingTabs
plugin on the tabs will no longer be clickable after the plugin is invoked.
Add handleDelayedScrollbar option
Sometimes a vertical scrollbar appears on the page after the plugin has already calculated its width, causing the right scroll arrow to wrap to the next line. Similarly, if the content of the default tab does not cause a scrollbar but another tab's content does, clicking that other tab can cause the scrollbar to appear, forcing the right scroll arrow to wrap.
If you're experiencing this situation, you can now pass the handleDelayedScrollbar option so the delayed appearance of a scrollbar will trigger the plugin to refresh its width.
Scroll active tab to center rather than just minimally into view
On window resize, if the active tab is not in the visible area, auto-scroll it to the center of the visible area rather than just minimally to the edge of the visible area as was previously being done.
This was a request from a user that made a lot of sense to me. I'm not sure why I was previously just scrolling it as little as possible to bring it into the edge of the view.
Add scroll arrow click target feature
Fixes issue #52.
When using options leftArrowContent
and rightArrowContent
to specify custom scroll arrow HTML, you can now specify a child element within that custom HTML to be the click target if you don't want the entire element to be clickable. You do that by adding CSS class scrtabs-click-target
to the element that should be the click target.
See the README section for Custom Scroll Arrow content for details.
Add tabsLiContent and tabsPostProcessors options
Fixes issue #45.
Allows, via the new tabsLiContent option, custom HTML to be specified for each tab's li
element.
Allows, via the new tabsPostProcessors option, post-processing functions to be specified for each tab. When a tab's li
element has been created, its post-processing function will be called with two arguments: the newly created $li
and $a
jQuery elements for that tab.
This plunk demonstrates both new features:
http://plnkr.co/edit/ugJLMk7lmDCuZQziQ0k0
Add small device support when using Bootstrap 4
For viewports <1024px wide, Boostrap 4 sets flex-direction
to
column
for .navbar-nav
, which caused the tabs inside the scroller
to disappear. This change forces flex-direction
to remain row
.
Make scrollToActiveTab work with RTL
Add Right-to-Left Language support
Fix window resize issue when multiple instances on page
This patch fixes issue #33: when there were multiple instances of scrolling tabs on the page, only one instance was getting refreshed on window resize. All instances will get refreshed now.
Fix swiping
Fixes issue #31.
This is a major version bump because it represents a breaking change for anyone who enabled swiping by manually adding CSS class scrtabs-allow-scrollbar
to a parent element of the scrolling tabs. That will no longer trigger a horizontal scrollbar for the tabs, so swiping will not be active. To enable swiping, you will instead need to pass in option enableSwiping: true
.
If you already enabled swiping by passing in option enableSwiping: true
, this change should not break anything, and should, in fact, fix a problem.
Swiping functionality is now handled via code rather than the browser's built-in scrolling with a scrollbar due to conflicts that occurred if, on a touch screen, you performed a combination of swiping and pressing the scroll arrows.