mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-09 23:26:40 +02:00
change namespace back to dot notation and someother js shizzle
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
var data = $this.data('button')
|
||||
var options = typeof option == 'object' && option
|
||||
|
||||
if (!data) $this.data('bs-button', (data = new Button(this, options)))
|
||||
if (!data) $this.data('bs.button', (data = new Button(this, options)))
|
||||
|
||||
if (option == 'toggle') data.toggle()
|
||||
else if (option) data.setState(option)
|
||||
@@ -96,7 +96,7 @@
|
||||
// BUTTON DATA-API
|
||||
// ===============
|
||||
|
||||
$(document).on('click.bs-button.bs-data-api', '[data-toggle^=button]', function (e) {
|
||||
$(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) {
|
||||
var $btn = $(e.target)
|
||||
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
||||
$btn.button('toggle')
|
||||
|
Reference in New Issue
Block a user