mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-18 19:31:35 +02:00
fix regression about using element for tooltip container option
This commit is contained in:
@@ -51,8 +51,11 @@
|
||||
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="left" title="Tooltip with XSS" data-container="<img src=1 onerror=alert(123) />">
|
||||
Tooltip with XSS
|
||||
</button>
|
||||
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="left" title="Tooltip with container" data-container="#customContainer">
|
||||
Tooltip with container
|
||||
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="left" title="Tooltip with container (selector)" data-container="#customContainer">
|
||||
Tooltip with container (selector)
|
||||
</button>
|
||||
<button id="tooltipElement" type="button" class="btn btn-secondary" data-placement="left" title="Tooltip with container (element)">
|
||||
Tooltip with container (element)
|
||||
</button>
|
||||
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-html="true" title="<em>Tooltip</em> <u>with</u> <b>HTML</b>">
|
||||
Tooltip with HTML
|
||||
@@ -70,6 +73,9 @@
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
$('#tooltipElement').tooltip({
|
||||
container: $('#customContainer')[0]
|
||||
})
|
||||
$('#target').tooltip({
|
||||
placement : 'top',
|
||||
trigger : 'manual'
|
||||
|
Reference in New Issue
Block a user