1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-26 05:19:15 +02:00

Add bs in data attributes

- Add `bs` in data APIs everywhere
- Update unit tests
This commit is contained in:
Rohit Sharma
2020-07-22 22:33:11 +03:00
committed by XhmikosR
parent fe961c192d
commit 418f17ee2b
76 changed files with 827 additions and 807 deletions

View File

@@ -443,7 +443,7 @@ class Tooltip {
}
getTitle() {
let title = this.element.getAttribute('data-original-title')
let title = this.element.getAttribute('data-bs-original-title')
if (!title) {
title = typeof this.config.title === 'function' ?
@@ -578,11 +578,11 @@ class Tooltip {
}
_fixTitle() {
const titleType = typeof this.element.getAttribute('data-original-title')
const titleType = typeof this.element.getAttribute('data-bs-original-title')
if (this.element.getAttribute('title') || titleType !== 'string') {
this.element.setAttribute(
'data-original-title',
'data-bs-original-title',
this.element.getAttribute('title') || ''
)