/* * SmartWizard 3.3.1 plugin * jQuery Wizard control Plugin * by Dipu * * Refactored and extended: * https://github.com/mstratman/jQuery-Smart-Wizard * * Original URLs: * http://www.techlaboratory.net * http://tech-laboratory.blogspot.com */ function SmartWizard(target, options) { this.target = target; this.options = options; this.curStepIdx = options.selected; this.steps = $(target).children("ul").children("li").children("a"); // Get all anchors this.contentWidth = 0; this.msgBox = $('
X
'); this.elmStepContainer = $('
').addClass("stepContainer"); this.loader = $('
Loading
').addClass("loader"); this.buttons = { next : $(''+options.labelNext+'').attr("href","#").addClass("btn btn-success"), previous : $(''+options.labelPrevious+'').attr("href","#").addClass("btn btn-primary"), finish : $(''+options.labelFinish+'').attr("href","#").addClass("btn btn-default") }; /* * Private functions */ var _init = function($this) { var elmActionBar = $('
').addClass("actionBar"); //elmActionBar.append($this.msgBox); $('.close',$this.msgBox).click(function() { $this.msgBox.fadeOut("normal"); return false; }); var allDivs = $this.target.children('div'); // CHeck if ul with steps has been added by user, if not add them if($this.target.children('ul').length == 0 ){ var ul = $("