This twitter bootstrap plugin builds a wizard out of a formatter tabbable structure. It allows to build a wizard functionality using buttons to go through the different wizard steps and using events allows to hook into each step individually.
I'm working with a team on a project that uses the wizard. We've created an override that listens for events fired by the wizard and can handle multiple bootstrap wizards based on data tag values on the elements. We've run into a problem where there are some variables referenced that are not defined. Namely, $element and $index.
We did not have an issue before our custom code, but we also cannot find where these values are created/pulled from, as they appear to be global variables not defined in the scope of the wizard. the problem lines (from jsHint) are:
Which shows that $index is used in this.next() and this.previous(). $element is used in innerTabShown. When var is added to instantiate the variables inside of these functions, the wizard works as intended. Oddly, this.remove() actually defines $index as var $index = args[0];. It would be helpful to know if this is intended (and thus where these elements get pulled from) or if we should submit a pull request with our fix.
TL; DR: Where are $index and $element pulled from?
I'm working with a team on a project that uses the wizard. We've created an override that listens for events fired by the wizard and can handle multiple bootstrap wizards based on data tag values on the elements. We've run into a problem where there are some variables referenced that are not defined. Namely,
$element
and$index
.We did not have an issue before our custom code, but we also cannot find where these values are created/pulled from, as they appear to be global variables not defined in the scope of the wizard. the problem lines (from jsHint) are:
Which shows that
$index
is used inthis.next()
andthis.previous()
.$element
is used ininnerTabShown
. Whenvar
is added to instantiate the variables inside of these functions, the wizard works as intended. Oddly,this.remove()
actually defines$index
asvar $index = args[0];
. It would be helpful to know if this is intended (and thus where these elements get pulled from) or if we should submit a pull request with our fix.TL; DR: Where are
$index
and$element
pulled from?