Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ $(function() {
|------|-------|-----------|
| selectorAttribute | false | Override the default `href` attribute used as selector when you need to activate multiple TabPanels at once with a single Tab using the `data-target` attribute. |
| backToTop |false | Prevent the page from jumping down to the tab content by setting the backToTop setting to true. |
| showTabUsingClickTrigger |false | Activate the requeted tab using the click trigger so that any behaviours on the click trigger are activated. |

NuGet package
=============
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery-stickytabs",
"version": "1.2.3",
"version": "1.2.5",
"homepage": "https://github.com/aidanlister/jquery-stickytabs",
"authors": [
"Aidan Lister <[email protected]>"
Expand Down
7 changes: 6 additions & 1 deletion jquery.stickytabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
var settings = $.extend({
getHashCallback: function(hash, btn) { return hash },
selectorAttribute: "href",
showTabUsingClickTrigger: false,
backToTop: false,
initialTab: $('li.active > a', context)
}, options );
Expand All @@ -20,7 +21,11 @@
var hash = settings.selectorAttribute == "href" ? window.location.hash : window.location.hash.substring(1);
if (hash != '') {
var selector = hash ? 'a[' + settings.selectorAttribute +'="' + hash + '"]' : settings.initialTab;
$(selector, context).tab('show');
if (settings.showTabUsingClickTrigger === true) {
$(selector, context).trigger('click');
} else {
$(selector, context).tab('show');
}
setTimeout(backToTop, 1);
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery-stickytabs",
"version": "1.2.3",
"version": "1.2.5",
"description": "jquery-stickytabs =================",
"main": "jquery.stickytabs.js",
"directories": {
Expand Down