twitter-bootstrap-wizard
twitter-bootstrap-wizard copied to clipboard
Show/hide demo broken
On the demo where you can show/hide tabs or steps, after you hide a tab, the next and previous do not work correctly. It skips over steps.
http://vinceg.github.io/twitter-bootstrap-wizard/examples/remove-step.html#
@abbottmw Yeah, i think because it does not call the refresh to reset the index count.
The :visible fix I added should resolve this.
The show/hide methods do not work even with the :visible fix added? Doing the following should show tab 3 and its tab panel - nothing happens?
$('#rootwizard').bootstrapWizard('display', 3);
Currently I'm having to revert to the standard bootstrap method:
$('#rootwizard li:eq(2) a').tab('show') // Select third tab (0-indexed)
When can we expect a fix?
Many thanks. That worked like a charm.
From: Vincent Gabriel [email protected]
Try
$('#rootwizard').bootstrapWizard('show', 2);
Is it possible to call the show method from inside the onInit event. The following doesnt work:
$('#rootwizard').bootstrapWizard({
'onInit': function (tab, navigation, index) {
var lastTabIndex = $("#LastTabIndex").val();
if (lastTabIndex)
$('#rootwizard').bootstrapWizard('show', lastTabIndex);
}
});
@Adam-78 without the condition does $('#rootwizard').bootstrapWizard('show', x);
work at all inside onInit?
I get console error:
TypeError: this.data(...) is undefined
In the debugger it highlights the following line:
return this.data('bootstrapWizard')[options](args);
I think it's because I'm trying to call the following from within $('#rootwizard').bootstrapWizard({...})
$('#rootwizard').bootstrapWizard('show', x);
@Adam-78 yeah it's impossible since onInit is called right after it's initialized.
i was able to make it work with the following
$('#rootwizard').bootstrapWizard({
'onInit': function (tab, navigation, index) {
setTimeout(function() {
$('#rootwizard').bootstrapWizard('show', 2);
}, 1);
}
});