aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2011-10-29 19:27:02 -0700
committerJacob Thornton <[email protected]>2011-10-29 19:27:02 -0700
commit640fd15464306238de99a3391888a95156e27995 (patch)
tree83c14ea7a106bf3ee26a7777c18c33ce01b92ce0 /js
parentea50e8aeeed6616a61a7e44d28fe60ced327be0c (diff)
downloadbootstrap-640fd15464306238de99a3391888a95156e27995.tar.xz
bootstrap-640fd15464306238de99a3391888a95156e27995.zip
allow the use of data attributes to define popover options
Diffstat (limited to 'js')
-rw-r--r--js/bootstrap-popover.js4
-rw-r--r--js/bootstrap-twipsy.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/js/bootstrap-popover.js b/js/bootstrap-popover.js
index a8a1d8e7b..e8f4ce096 100644
--- a/js/bootstrap-popover.js
+++ b/js/bootstrap-popover.js
@@ -47,7 +47,7 @@
, o = this.options
if (typeof this.options.content == 'string') {
- content = $e.attr(o.content)
+ content = this.options.content
} else if (typeof this.options.content == 'function') {
content = this.options.content.call(this.$element[0])
}
@@ -74,6 +74,6 @@
return this
}
- $.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, { content: 'data-content', placement: 'right'})
+ $.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, { placement: 'right'})
}( window.jQuery || window.ender ); \ No newline at end of file
diff --git a/js/bootstrap-twipsy.js b/js/bootstrap-twipsy.js
index ad2938a1a..f0e5b1b90 100644
--- a/js/bootstrap-twipsy.js
+++ b/js/bootstrap-twipsy.js
@@ -299,7 +299,7 @@
}
$.fn.twipsy.elementOptions = function(ele, options) {
- return $.metadata ? $.extend({}, options, $(ele).metadata()) : options
+ return $.extend({}, options, $(ele).data())
}
}( window.jQuery || window.ender ); \ No newline at end of file