diff options
| author | Jacob Thornton <[email protected]> | 2011-12-20 18:02:47 -0800 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2011-12-20 18:02:47 -0800 |
| commit | 1ef5fa7d6b4e50230c0c12919b0a06a9a2ac07f1 (patch) | |
| tree | 72a3b02a1755096a9737451dea3030f0da65197d /js/bootstrap-button.js | |
| parent | 7df0d1c7d18a72f401094d08afa4eaa9142fe511 (diff) | |
| download | bootstrap-1ef5fa7d6b4e50230c0c12919b0a06a9a2ac07f1.tar.xz bootstrap-1ef5fa7d6b4e50230c0c12919b0a06a9a2ac07f1.zip | |
giant refactor - all spec passing again...
Diffstat (limited to 'js/bootstrap-button.js')
| -rw-r--r-- | js/bootstrap-button.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/bootstrap-button.js b/js/bootstrap-button.js index 4ed24d98b..508835a38 100644 --- a/js/bootstrap-button.js +++ b/js/bootstrap-button.js @@ -24,16 +24,16 @@ /* BUTTON PUBLIC CLASS DEFINITION * ============================== */ - var Button = function (element, options) { + var Button = function ( element, options ) { this.$element = $(element) - this.settings = $.extend({}, $.fn.button.defaults, options) + this.options = $.extend({}, $.fn.button.defaults, options) } Button.prototype = { constructor: Button - , setState: function (state) { + , setState: function ( state ) { var d = 'disabled' , $el = this.$element , data = $el.data() @@ -42,7 +42,7 @@ state = state + 'Text' data.resetText || $el.data('resetText', $el[val]()) - $el[val](data[state] || this.settings[state]) + $el[val](data[state] || this.options[state]) // push to event loop to allow forms to submit setTimeout(function () { @@ -90,9 +90,9 @@ * =============== */ $(function () { - $('body').delegate('[data-toggle^=button]', 'click.button.data-api', function (e) { + $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) { $(e.srcElement).button('toggle') }) }) -}( window.jQuery || window.ender )
\ No newline at end of file +}( window.jQuery )
\ No newline at end of file |
