Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
b9c7f291
Commit
b9c7f291
authored
Dec 24, 2012
by
fat-kun
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6378 from Yohn/patch-7
fixes tooltip insert problems
parents
90cdef8d
340d9013
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
1 deletion
+29
-1
docs/javascript.html
docs/javascript.html
+8
-0
docs/templates/pages/javascript.mustache
docs/templates/pages/javascript.mustache
+8
-0
js/bootstrap-tooltip.js
js/bootstrap-tooltip.js
+3
-1
js/tests/unit/bootstrap-tooltip.js
js/tests/unit/bootstrap-tooltip.js
+10
-0
No files found.
docs/javascript.html
View file @
b9c7f291
...
...
@@ -849,6 +849,14 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<p>
Object structure is:
<code>
delay: { show: 500, hide: 100 }
</code></p>
</td>
</tr>
<tr>
<td>
container
</td>
<td>
string | false
</td>
<td>
false
</td>
<td>
<p>
Appends the tooltip to a specific element
<code>
container: 'body'
</code></p>
</td>
</tr>
</tbody>
</table>
<div
class=
"alert alert-info"
>
...
...
docs/templates/pages/javascript.mustache
View file @
b9c7f291
...
...
@@ -779,6 +779,14 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<p>
{{
_i
}}
Object structure is:
<code>
delay: { show: 500, hide: 100 }
</code>
{{/
i
}}
</p>
</td>
</tr>
<tr>
<td>
{{
_i
}}
container
{{/
i
}}
</td>
<td>
{{
_i
}}
string | false
{{/
i
}}
</td>
<td>
{{
_i
}}
false
{{/
i
}}
</td>
<td>
<p>
{{
_i
}}
Appends the tooltip to a specific element
<code>
container: 'body'
</code>
{{/
i
}}
</p>
</td>
</tr>
</tbody>
</table>
<div
class=
"alert alert-info"
>
...
...
js/bootstrap-tooltip.js
View file @
b9c7f291
...
...
@@ -129,7 +129,8 @@
$tip
.
detach
()
.
css
({
top
:
0
,
left
:
0
,
display
:
'
block
'
})
.
insertAfter
(
this
.
$element
)
this
.
options
.
container
?
$tip
.
appendTo
(
this
.
options
.
container
)
:
$tip
.
insertAfter
(
this
.
$element
)
pos
=
this
.
getPosition
()
...
...
@@ -290,6 +291,7 @@
,
title
:
''
,
delay
:
0
,
html
:
false
,
container
:
false
}
...
...
js/tests/unit/bootstrap-tooltip.js
View file @
b9c7f291
...
...
@@ -241,4 +241,14 @@ $(function () {
.
tooltip
(
'
toggle
'
)
ok
(
$
(
"
.tooltip
"
).
is
(
'
.fade.in
'
),
'
tooltip should be toggled in
'
)
})
test
(
"
should place tooltips inside the body
"
,
function
()
{
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" title="Another tooltip"></a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
tooltip
({
container
:
'
body
'
})
.
tooltip
(
'
show
'
)
ok
(
$
(
"
body > .tooltip
"
).
length
,
'
inside the body
'
)
ok
(
!
$
(
"
#qunit-fixture > .tooltip
"
).
length
,
'
not found in parent
'
)
tooltip
.
tooltip
(
'
hide
'
)
})
})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment