aboutsummaryrefslogtreecommitdiff
path: root/docs/assets/js/bootstrap.js
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2012-08-18 19:54:30 -0700
committerJacob Thornton <[email protected]>2012-08-18 19:54:30 -0700
commit45dddc59a19f3e9decaa4bf0e0db3f884a0f6ff7 (patch)
tree39616e8cd0f2c6b5f7c94a90a8e637ce263137c3 /docs/assets/js/bootstrap.js
parent44e35e9dfa33fe618218c770f0495bd9596f3485 (diff)
downloadbootstrap-45dddc59a19f3e9decaa4bf0e0db3f884a0f6ff7.tar.xz
bootstrap-45dddc59a19f3e9decaa4bf0e0db3f884a0f6ff7.zip
add click option for tooltip, popover - make click default for popover
Diffstat (limited to 'docs/assets/js/bootstrap.js')
-rw-r--r--docs/assets/js/bootstrap.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js
index 269fb206f..938dac9b4 100644
--- a/docs/assets/js/bootstrap.js
+++ b/docs/assets/js/bootstrap.js
@@ -1006,8 +1006,10 @@
this.options = this.getOptions(options)
this.enabled = true
- if (this.options.trigger != 'manual') {
- eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
+ if (this.options.trigger == 'click') {
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+ } else if (this.options.trigger != 'manual') {
+ eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
@@ -1330,6 +1332,7 @@
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
placement: 'right'
+ , trigger: 'click'
, content: ''
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
})