1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-10 23:54:08 +02:00
This commit is contained in:
Mark Otto
2016-11-26 19:17:23 -08:00
parent 23301b21cd
commit 0b8a281920
22 changed files with 44 additions and 116 deletions

10
js/dist/tooltip.js vendored
View File

@@ -45,7 +45,8 @@ var Tooltip = function ($) {
selector: false,
placement: 'top',
offset: '0 0',
constraints: []
constraints: [],
container: false
};
var DefaultType = {
@@ -58,7 +59,8 @@ var Tooltip = function ($) {
selector: '(string|boolean)',
placement: '(string|function)',
offset: 'string',
constraints: 'array'
constraints: 'array',
container: '(string|element|boolean)'
};
var AttachmentMap = {
@@ -234,7 +236,9 @@ var Tooltip = function ($) {
var attachment = this._getAttachment(placement);
$(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body);
var container = this.config.container === false ? document.body : $(this.config.container);
$(tip).data(this.constructor.DATA_KEY, this).appendTo(container);
$(this.element).trigger(this.constructor.Event.INSERTED);