Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Allow spinner step interval option to be set via data attribute #1479

Merged
merged 1 commit into from
Aug 21, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions js/spinbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
e.preventDefault();
});
this.options = $.extend({}, $.fn.spinbox.defaults, options);
this.options.step = this.$element.data('step') || this.options.step;

this.$input = this.$element.find('.spinbox-input');
this.$element.on('focusin.fu.spinbox', this.$input, $.proxy(this.changeFlag, this));
this.$element.on('focusout.fu.spinbox', this.$input, $.proxy(this.change, this));
Expand Down