aboutsummaryrefslogtreecommitdiff
path: root/js/bootstrap-button.js
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2011-12-21 18:39:02 -0600
committerMark Otto <[email protected]>2011-12-21 18:39:02 -0600
commit9fb380151d477f1741b7609ade7a9e7fd5450b2c (patch)
treea749f2b6917c09770af1586ae9f83e46115de7eb /js/bootstrap-button.js
parent12a0d69454a2831031035d19237d36d38bb2c2a9 (diff)
parenta5a98a8a984512011dac1216b432b86c6eff96a4 (diff)
downloadbootstrap-9fb380151d477f1741b7609ade7a9e7fd5450b2c.tar.xz
bootstrap-9fb380151d477f1741b7609ade7a9e7fd5450b2c.zip
Merge branch '2.0-wip' of github.com:twitter/bootstrap into 2.0-wip
Conflicts: bootstrap.css docs/javascript.html
Diffstat (limited to 'js/bootstrap-button.js')
-rw-r--r--js/bootstrap-button.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/js/bootstrap-button.js b/js/bootstrap-button.js
index 4ed24d98b..10a85835e 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 () {
@@ -83,16 +83,16 @@
loadingText: 'loading...'
}
- $.fn.button.Button = Button
+ $.fn.button.Constructor = Button
/* BUTTON DATA-API
* =============== */
$(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