Skip to content

Commit

Permalink
Updated find to use non-visible element steps in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
bt committed Jan 11, 2016
1 parent 487e6d6 commit c9b3112
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ Options
</tr>
</thead>
<tbody>
<tr>
<td>withVisible</td>
<td>true</td>
<td>Find only visible li step elements. Set to `false` if your steps display is hidden.</td>
</tr>
<tr>
<td>tabClass</td>
<td>'nav nav-pills'</td>
Expand Down
11 changes: 6 additions & 5 deletions jquery.bootstrap.wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ var bootstrapWizardCreate = function(element, options) {
if($index > obj.navigationLength()) {
} else {
historyStack.push(formerIndex);
$navigation.find(baseItemSelector + ':visible:eq(' + $index + ') a').tab('show');
$navigation.find(baseItemSelector + ':' + ($settings.withVisible ? ':visible' : '') + ':eq(' + $index + ') a').tab('show');
}
};

Expand All @@ -95,7 +95,7 @@ var bootstrapWizardCreate = function(element, options) {
if($index < 0) {
} else {
historyStack.push(formerIndex);
$navigation.find(baseItemSelector + ':visible:eq(' + $index + ') a').tab('show');
$navigation.find(baseItemSelector + ':' + ($settings.withVisible ? ':visible' : '') + ':eq(' + $index + ') a').tab('show');
}
};

Expand Down Expand Up @@ -308,21 +308,22 @@ $.fn.bootstrapWizard = function(options) {

// expose options
$.fn.bootstrapWizard.defaults = {
withVisible: true,
tabClass: 'nav nav-pills',
nextSelector: '.wizard li.next',
previousSelector: '.wizard li.previous',
firstSelector: '.wizard li.first',
lastSelector: '.wizard li.last',
finishSelector: '.wizard li.finish',
finishSelector: '.wizard li.finish',
backSelector: '.wizard li.back',
onShow: null,
onInit: null,
onNext: null,
onPrevious: null,
onLast: null,
onFirst: null,
onFinish: null,
onBack: null,
onFinish: null,
onBack: null,
onTabChange: null,
onTabClick: null,
onTabShow: null
Expand Down
2 changes: 1 addition & 1 deletion jquery.bootstrap.wizard.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c9b3112

Please # to comment.