1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-30 08:39:56 +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

@@ -2,6 +2,6 @@ import 'popper.js'
import Tooltip from '../../dist/tooltip'
window.addEventListener('load', () => {
[...document.querySelectorAll('[data-toggle="tooltip"]')]
[...document.querySelectorAll('[data-bs-toggle="tooltip"]')]
.map(tooltipNode => new Tooltip(tooltipNode))
})

View File

@@ -2,6 +2,6 @@ import 'popper.js'
import { Tooltip } from '../../../dist/js/bootstrap.esm.js'
window.addEventListener('load', () => {
[...document.querySelectorAll('[data-toggle="tooltip"]')]
[...document.querySelectorAll('[data-bs-toggle="tooltip"]')]
.map(tooltipNode => new Tooltip(tooltipNode))
})

View File

@@ -14,14 +14,14 @@
<div class="container">
<h1>Hello, world!</h1>
<div class="mt-5">
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="top" title="Tooltip on top">
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="top" title="Tooltip on top">
Tooltip on top
</button>
<div id="carouselExampleCaptions" class="carousel slide mt-2" data-ride="carousel">
<div id="carouselExampleCaptions" class="carousel slide mt-2" data-bs-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleCaptions" data-slide-to="0"></li>
<li data-target="#carouselExampleCaptions" data-slide-to="1" class="active"></li>
<li data-target="#carouselExampleCaptions" data-slide-to="2"></li>
<li data-bs-target="#carouselExampleCaptions" data-bs-slide-to="0"></li>
<li data-bs-target="#carouselExampleCaptions" data-bs-slide-to="1" class="active"></li>
<li data-bs-target="#carouselExampleCaptions" data-bs-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item">
@@ -46,11 +46,11 @@
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-slide="prev">
<a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-slide="next">
<a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</a>