Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
6a974f9f
Commit
6a974f9f
authored
12 years ago
by
Jon Stevens
Browse files
Options
Download
Email Patches
Plain Diff
enable the ability to destroy tooltips and popovers from elements. related to issue
#3453
parent
bae3cfd1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/templates/pages/javascript.mustache
+7
-1
docs/templates/pages/javascript.mustache
js/bootstrap-popover.js
+6
-0
js/bootstrap-popover.js
js/bootstrap-tooltip.js
+6
-0
js/bootstrap-tooltip.js
with
19 additions
and
1 deletion
+19
-1
docs/templates/pages/javascript.mustache
+
7
-
1
View file @
6a974f9f
...
...
@@ -755,6 +755,9 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<h4>
.tooltip('toggle')
</h4>
<p>
{{
_i
}}
Toggles an element's tooltip.
{{/
i
}}
</p>
<pre
class=
"prettyprint linenums"
>
$('#element').tooltip('toggle')
</pre>
<h4>
.tooltip('destroy')
</h4>
<p>
{{
_i
}}
Destroys an element's tooltip.
{{/
i
}}
</p>
<pre
class=
"prettyprint linenums"
>
$('#element').tooltip('destroy')
</pre>
</section>
...
...
@@ -821,7 +824,7 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<td>
{{
_i
}}
trigger
{{/
i
}}
</td>
<td>
{{
_i
}}
string
{{/
i
}}
</td>
<td>
'hover'
</td>
<td>
{{
_i
}}
how
tooltip
is triggered
{{/
i
}}
- hover | focus | manual
</td>
<td>
{{
_i
}}
how
popover
is triggered
{{/
i
}}
- hover | focus | manual
</td>
</tr>
<tr>
<td>
{{
_i
}}
title
{{/
i
}}
</td>
...
...
@@ -867,6 +870,9 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<h4>
.popover('toggle')
</h4>
<p>
{{
_i
}}
Toggles an elements popover.
{{/
i
}}
</p>
<pre
class=
"prettyprint linenums"
>
$('#element').popover('toggle')
</pre>
<h4>
.popover('popover')
</h4>
<p>
{{
_i
}}
Destroys an element's popover.
{{/
i
}}
</p>
<pre
class=
"prettyprint linenums"
>
$('#element').popover('destroy')
</pre>
</section>
...
...
This diff is collapsed.
Click to expand it.
js/bootstrap-popover.js
+
6
-
0
View file @
6a974f9f
...
...
@@ -71,6 +71,12 @@
return
this
.
$tip
}
,
destroy
:
function
()
{
var
$e
=
this
.
$element
$e
.
off
()
$e
.
removeData
(
'
popover
'
)
}
})
...
...
This diff is collapsed.
Click to expand it.
js/bootstrap-tooltip.js
+
6
-
0
View file @
6a974f9f
...
...
@@ -235,6 +235,12 @@
this
[
this
.
tip
().
hasClass
(
'
in
'
)
?
'
hide
'
:
'
show
'
]()
}
,
destroy
:
function
()
{
var
$e
=
this
.
$element
$e
.
off
()
$e
.
removeData
(
'
tooltip
'
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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