diff options
Diffstat (limited to 'docs/dist/js/umd/popover.js')
-rw-r--r-- | docs/dist/js/umd/popover.js | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/docs/dist/js/umd/popover.js b/docs/dist/js/umd/popover.js index fe0f41d8db..057eb0b31b 100644 --- a/docs/dist/js/umd/popover.js +++ b/docs/dist/js/umd/popover.js @@ -54,7 +54,7 @@ }); var DefaultType = $.extend({}, _Tooltip2['default'].DefaultType, { - content: '(string|function)' + content: '(string|element|function)' }); var ClassName = { @@ -118,19 +118,13 @@ }, { key: 'setContent', value: function setContent() { - var tip = this.getTipElement(); - var title = this.getTitle(); - var content = this._getContent(); - var $titleElement = $(tip).find(Selector.TITLE); - - if ($titleElement) { - $titleElement[this.config.html ? 'html' : 'text'](title); - } + var $tip = $(this.getTipElement()); // we use append for html objects to maintain js events - $(tip).find(Selector.CONTENT).children().detach().end()[this.config.html ? typeof content === 'string' ? 'html' : 'append' : 'text'](content); + this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); + this.setElementContent($tip.find(Selector.CONTENT), this._getContent()); - $(tip).removeClass(ClassName.FADE).removeClass(ClassName.IN); + $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN); this.cleanupTether(); } |