1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-23 21:53:25 +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

View File

@@ -5,7 +5,7 @@
*/
if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\'s JavaScript requires jQuery')
throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.')
}
+function ($) {
@@ -2732,7 +2732,8 @@ var Tooltip = function ($) {
selector: false,
placement: 'top',
offset: '0 0',
constraints: []
constraints: [],
container: false
};
var DefaultType = {
@@ -2745,7 +2746,8 @@ var Tooltip = function ($) {
selector: '(string|boolean)',
placement: '(string|function)',
offset: 'string',
constraints: 'array'
constraints: 'array',
container: '(string|element|boolean)'
};
var AttachmentMap = {
@@ -2921,7 +2923,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);

File diff suppressed because one or more lines are too long