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
2017-03-28 09:31:32 -07:00
parent 296c99020c
commit cf7d3e11e0
16 changed files with 75 additions and 37 deletions

View File

@@ -2794,6 +2794,7 @@ var Tooltip = function ($) {
var JQUERY_NO_CONFLICT = $.fn[NAME];
var TRANSITION_DURATION = 150;
var CLASS_PREFIX = 'bs-tether';
var TETHER_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');
var Default = {
animation: true,
@@ -3058,6 +3059,7 @@ var Tooltip = function ($) {
tip.parentNode.removeChild(tip);
}
_this23._cleanTipClass();
_this23.element.removeAttribute('aria-describedby');
$(_this23.element).trigger(_this23.constructor.Event.HIDDEN);
_this23._isTransitioning = false;
@@ -3148,6 +3150,14 @@ var Tooltip = function ($) {
return AttachmentMap[placement.toUpperCase()];
};
Tooltip.prototype._cleanTipClass = function _cleanTipClass() {
var $tip = $(this.getTipElement());
var tabClass = $tip.attr('class').match(TETHER_PREFIX_REGEX);
if (tabClass !== null && tabClass.length > 0) {
$tip.removeClass(tabClass.join(''));
}
};
Tooltip.prototype._setListeners = function _setListeners() {
var _this24 = this;

File diff suppressed because one or more lines are too long