steps extension, more custom buildNavItems
This commit is contained in:
parent
54abce3b31
commit
e2b2575ee8
3 changed files with 14 additions and 8 deletions
|
@ -9,7 +9,9 @@ module.exports = {
|
|||
container: '.idealsteps-container',
|
||||
nav: '.idealsteps-nav',
|
||||
navItems: 'li',
|
||||
buildNavItems: true,
|
||||
buildNavItems: function(i) {
|
||||
return 'Step '+ (i+1);
|
||||
},
|
||||
wrap: '.idealsteps-wrap',
|
||||
step: '.idealsteps-step',
|
||||
activeClass: 'idealsteps-step-active',
|
||||
|
@ -56,13 +58,14 @@ module.exports = {
|
|||
|
||||
var self = this, options
|
||||
, hasRules = ! $.isEmptyObject(this.opts.rules)
|
||||
, buildNavItems = this.opts.steps.buildNavItems
|
||||
, counter = hasRules
|
||||
? '<span class="counter"/>'
|
||||
: '<span class="counter zero">0</span>';
|
||||
|
||||
if (this.opts.steps.buildNavItems === true) {
|
||||
if (this.opts.steps.buildNavItems) {
|
||||
this.opts.steps.buildNavItems = function(i) {
|
||||
return 'Step '+ (i+1) + counter;
|
||||
return buildNavItems(i) + counter;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
2
js/out/jquery.idealforms.min.js
vendored
2
js/out/jquery.idealforms.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue