mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-10 23:54:08 +02:00
grunt
This commit is contained in:
10
js/dist/tooltip.js
vendored
10
js/dist/tooltip.js
vendored
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user