0
我为我的新网站使用引导程序。我想使用按钮插件。不是将jquery.trigger代码添加到bootstrap-button.js中,是否有当前的最佳做法来获取单击按钮时显示的警报?twitter引导按钮单击
引导-button.js:
Button.prototype.toggle = function() {
var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
$parent && $parent
.find('.active')
.removeClass('active')
this.$element.toggleClass('active')
this.$element.trigger('button-change') //added code
}
你能更具体,以你要完成?如果按钮确实触发了一个事件,你会做什么?不知道更多细节,我无法提出建议。 – merv
感谢您指出我的问题过于笼统。我编辑它。 – prostock