Skip to content
This repository has been archived by the owner on Aug 6, 2019. It is now read-only.

Commit

Permalink
Merge pull request #168 from jstaerk/patch-2
Browse files Browse the repository at this point in the history
fix of issue 167
  • Loading branch information
VinceG committed Apr 1, 2016
2 parents 4640044 + 4c29fb5 commit cc1a915
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jquery.bootstrap.wizard.js
Expand Up @@ -228,7 +228,7 @@ var bootstrapWizardCreate = function(element, options) {
}
};

var innerTabShown = function (e) { // use shown instead of show to help prevent double firing
var innerTabShown = function (e) {
var $element = $(e.target).parent();
var nextTab = $navigation.find(baseItemSelector).index($element);

Expand All @@ -249,15 +249,15 @@ var bootstrapWizardCreate = function(element, options) {

// remove the existing handlers
$('a[data-toggle="tab"]', $navigation).off('click', innerTabClick);
$('a[data-toggle="tab"]', $navigation).off('shown shown.bs.tab', innerTabShown);
$('a[data-toggle="tab"]', $navigation).off('show show.bs.tab', innerTabShown);

// reset elements based on current state of the DOM
$navigation = element.find('ul:first', element);
$activeTab = $navigation.find(baseItemSelector + '.active', element);

// re-add handlers
$('a[data-toggle="tab"]', $navigation).on('click', innerTabClick);
$('a[data-toggle="tab"]', $navigation).on('shown shown.bs.tab', innerTabShown);
$('a[data-toggle="tab"]', $navigation).on('show show.bs.tab', innerTabShown);

obj.fixNavigationButtons();
};
Expand All @@ -281,8 +281,8 @@ var bootstrapWizardCreate = function(element, options) {

$('a[data-toggle="tab"]', $navigation).on('click', innerTabClick);

// attach to both shown and shown.bs.tab to support Bootstrap versions 2.3.2 and 3.0.0
$('a[data-toggle="tab"]', $navigation).on('shown shown.bs.tab', innerTabShown);
// attach to both show and show.bs.tab to support Bootstrap versions 2.3.2 and 3.0.0
$('a[data-toggle="tab"]', $navigation).on('show show.bs.tab', innerTabShown);
};
$.fn.bootstrapWizard = function(options) {
//expose methods
Expand Down

0 comments on commit cc1a915

Please sign in to comment.