setup.js 393 B

1234567891011121314151617
  1. var counter = 0;
  2. var Wizard = function(element, options) {
  3. this.$element = $(element);
  4. this.options = $.extend(true, {}, Wizard.defaults, options);
  5. this.$steps = this.$element.find(this.options.step);
  6. this.id = this.$element.attr('id');
  7. if(!this.id){
  8. this.id = 'wizard-' + (++counter);
  9. this.$element.attr('id', this.id);
  10. }
  11. this.initialize();
  12. }