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
fad0fb68
Commit
fad0fb68
authored
Dec 22, 2012
by
fat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow multiple trigger types in tooltip and popover + default tooltip to hover & focus
parent
e2434fef
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
53 additions
and
29 deletions
+53
-29
docs/assets/js/bootstrap-tooltip.js
docs/assets/js/bootstrap-tooltip.js
+16
-8
docs/assets/js/bootstrap.js
docs/assets/js/bootstrap.js
+16
-8
docs/assets/js/bootstrap.min.js
docs/assets/js/bootstrap.min.js
+1
-1
docs/javascript.html
docs/javascript.html
+2
-2
docs/templates/pages/javascript.mustache
docs/templates/pages/javascript.mustache
+2
-2
js/bootstrap-tooltip.js
js/bootstrap-tooltip.js
+16
-8
No files found.
docs/assets/js/bootstrap-tooltip.js
View file @
fad0fb68
...
@@ -38,19 +38,27 @@
...
@@ -38,19 +38,27 @@
,
init
:
function
(
type
,
element
,
options
)
{
,
init
:
function
(
type
,
element
,
options
)
{
var
eventIn
var
eventIn
,
eventOut
,
eventOut
,
triggers
,
trigger
,
i
this
.
type
=
type
this
.
type
=
type
this
.
$element
=
$
(
element
)
this
.
$element
=
$
(
element
)
this
.
options
=
this
.
getOptions
(
options
)
this
.
options
=
this
.
getOptions
(
options
)
this
.
enabled
=
true
this
.
enabled
=
true
if
(
this
.
options
.
trigger
==
'
click
'
)
{
triggers
=
this
.
options
.
trigger
.
split
(
'
'
)
this
.
$element
.
on
(
'
click.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
toggle
,
this
))
}
else
if
(
this
.
options
.
trigger
!=
'
manual
'
)
{
for
(
i
=
triggers
.
length
;
i
--
;)
{
eventIn
=
this
.
options
.
trigger
==
'
hover
'
?
'
mouseenter
'
:
'
focus
'
trigger
=
triggers
[
i
]
eventOut
=
this
.
options
.
trigger
==
'
hover
'
?
'
mouseleave
'
:
'
blur
'
if
(
trigger
==
'
click
'
)
{
this
.
$element
.
on
(
eventIn
+
'
.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
enter
,
this
))
this
.
$element
.
on
(
'
click.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
toggle
,
this
))
this
.
$element
.
on
(
eventOut
+
'
.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
leave
,
this
))
}
else
if
(
trigger
!=
'
manual
'
)
{
eventIn
=
trigger
==
'
hover
'
?
'
mouseenter
'
:
'
focus
'
eventOut
=
trigger
==
'
hover
'
?
'
mouseleave
'
:
'
blur
'
this
.
$element
.
on
(
eventIn
+
'
.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
enter
,
this
))
this
.
$element
.
on
(
eventOut
+
'
.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
leave
,
this
))
}
}
}
this
.
options
.
selector
?
this
.
options
.
selector
?
...
@@ -267,7 +275,7 @@
...
@@ -267,7 +275,7 @@
,
placement
:
'
top
'
,
placement
:
'
top
'
,
selector
:
false
,
selector
:
false
,
template
:
'
<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>
'
,
template
:
'
<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>
'
,
trigger
:
'
hover
'
,
trigger
:
'
hover
focus
'
,
title
:
''
,
title
:
''
,
delay
:
0
,
delay
:
0
,
html
:
false
,
html
:
false
...
...
docs/assets/js/bootstrap.js
View file @
fad0fb68
...
@@ -1075,19 +1075,27 @@
...
@@ -1075,19 +1075,27 @@
,
init
:
function
(
type
,
element
,
options
)
{
,
init
:
function
(
type
,
element
,
options
)
{
var
eventIn
var
eventIn
,
eventOut
,
eventOut
,
triggers
,
trigger
,
i
this
.
type
=
type
this
.
type
=
type
this
.
$element
=
$
(
element
)
this
.
$element
=
$
(
element
)
this
.
options
=
this
.
getOptions
(
options
)
this
.
options
=
this
.
getOptions
(
options
)
this
.
enabled
=
true
this
.
enabled
=
true
if
(
this
.
options
.
trigger
==
'
click
'
)
{
triggers
=
this
.
options
.
trigger
.
split
(
'
'
)
this
.
$element
.
on
(
'
click.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
toggle
,
this
))
}
else
if
(
this
.
options
.
trigger
!=
'
manual
'
)
{
for
(
i
=
triggers
.
length
;
i
--
;)
{
eventIn
=
this
.
options
.
trigger
==
'
hover
'
?
'
mouseenter
'
:
'
focus
'
trigger
=
triggers
[
i
]
eventOut
=
this
.
options
.
trigger
==
'
hover
'
?
'
mouseleave
'
:
'
blur
'
if
(
trigger
==
'
click
'
)
{
this
.
$element
.
on
(
eventIn
+
'
.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
enter
,
this
))
this
.
$element
.
on
(
'
click.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
toggle
,
this
))
this
.
$element
.
on
(
eventOut
+
'
.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
leave
,
this
))
}
else
if
(
trigger
!=
'
manual
'
)
{
eventIn
=
trigger
==
'
hover
'
?
'
mouseenter
'
:
'
focus
'
eventOut
=
trigger
==
'
hover
'
?
'
mouseleave
'
:
'
blur
'
this
.
$element
.
on
(
eventIn
+
'
.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
enter
,
this
))
this
.
$element
.
on
(
eventOut
+
'
.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
leave
,
this
))
}
}
}
this
.
options
.
selector
?
this
.
options
.
selector
?
...
@@ -1304,7 +1312,7 @@
...
@@ -1304,7 +1312,7 @@
,
placement
:
'
top
'
,
placement
:
'
top
'
,
selector
:
false
,
selector
:
false
,
template
:
'
<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>
'
,
template
:
'
<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>
'
,
trigger
:
'
hover
'
,
trigger
:
'
hover
focus
'
,
title
:
''
,
title
:
''
,
delay
:
0
,
delay
:
0
,
html
:
false
,
html
:
false
...
...
docs/assets/js/bootstrap.min.js
View file @
fad0fb68
This diff is collapsed.
Click to expand it.
docs/javascript.html
View file @
fad0fb68
...
@@ -836,8 +836,8 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
...
@@ -836,8 +836,8 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<tr>
<tr>
<td>
trigger
</td>
<td>
trigger
</td>
<td>
string
</td>
<td>
string
</td>
<td>
'hover'
</td>
<td>
'hover
focus
'
</td>
<td>
how tooltip is triggered - click | hover | focus | manual
</td>
<td>
how tooltip is triggered - click | hover | focus | manual
. Note, you case pass trigger mutliple, space seperated, trigger types.
</td>
</tr>
</tr>
<tr>
<tr>
<td>
delay
</td>
<td>
delay
</td>
...
...
docs/templates/pages/javascript.mustache
View file @
fad0fb68
...
@@ -766,8 +766,8 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
...
@@ -766,8 +766,8 @@ $('a[data-toggle="tab"]').on('shown', function (e) {
<tr>
<tr>
<td>
{{
_i
}}
trigger
{{/
i
}}
</td>
<td>
{{
_i
}}
trigger
{{/
i
}}
</td>
<td>
{{
_i
}}
string
{{/
i
}}
</td>
<td>
{{
_i
}}
string
{{/
i
}}
</td>
<td>
'hover'
</td>
<td>
'hover
focus
'
</td>
<td>
{{
_i
}}
how tooltip is triggered
{{/
i
}}
- click | hover | focus | manual
</td>
<td>
{{
_i
}}
how tooltip is triggered
{{/
i
}}
- click | hover | focus | manual
.
{{
_i
}}
Note you case pass trigger mutliple, space seperated, trigger types.
{{/
i
}}
</td>
</tr>
</tr>
<tr>
<tr>
<td>
{{
_i
}}
delay
{{/
i
}}
</td>
<td>
{{
_i
}}
delay
{{/
i
}}
</td>
...
...
js/bootstrap-tooltip.js
View file @
fad0fb68
...
@@ -38,19 +38,27 @@
...
@@ -38,19 +38,27 @@
,
init
:
function
(
type
,
element
,
options
)
{
,
init
:
function
(
type
,
element
,
options
)
{
var
eventIn
var
eventIn
,
eventOut
,
eventOut
,
triggers
,
trigger
,
i
this
.
type
=
type
this
.
type
=
type
this
.
$element
=
$
(
element
)
this
.
$element
=
$
(
element
)
this
.
options
=
this
.
getOptions
(
options
)
this
.
options
=
this
.
getOptions
(
options
)
this
.
enabled
=
true
this
.
enabled
=
true
if
(
this
.
options
.
trigger
==
'
click
'
)
{
triggers
=
this
.
options
.
trigger
.
split
(
'
'
)
this
.
$element
.
on
(
'
click.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
toggle
,
this
))
}
else
if
(
this
.
options
.
trigger
!=
'
manual
'
)
{
for
(
i
=
triggers
.
length
;
i
--
;)
{
eventIn
=
this
.
options
.
trigger
==
'
hover
'
?
'
mouseenter
'
:
'
focus
'
trigger
=
triggers
[
i
]
eventOut
=
this
.
options
.
trigger
==
'
hover
'
?
'
mouseleave
'
:
'
blur
'
if
(
trigger
==
'
click
'
)
{
this
.
$element
.
on
(
eventIn
+
'
.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
enter
,
this
))
this
.
$element
.
on
(
'
click.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
toggle
,
this
))
this
.
$element
.
on
(
eventOut
+
'
.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
leave
,
this
))
}
else
if
(
trigger
!=
'
manual
'
)
{
eventIn
=
trigger
==
'
hover
'
?
'
mouseenter
'
:
'
focus
'
eventOut
=
trigger
==
'
hover
'
?
'
mouseleave
'
:
'
blur
'
this
.
$element
.
on
(
eventIn
+
'
.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
enter
,
this
))
this
.
$element
.
on
(
eventOut
+
'
.
'
+
this
.
type
,
this
.
options
.
selector
,
$
.
proxy
(
this
.
leave
,
this
))
}
}
}
this
.
options
.
selector
?
this
.
options
.
selector
?
...
@@ -267,7 +275,7 @@
...
@@ -267,7 +275,7 @@
,
placement
:
'
top
'
,
placement
:
'
top
'
,
selector
:
false
,
selector
:
false
,
template
:
'
<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>
'
,
template
:
'
<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>
'
,
trigger
:
'
hover
'
,
trigger
:
'
hover
focus
'
,
title
:
''
,
title
:
''
,
delay
:
0
,
delay
:
0
,
html
:
false
,
html
:
false
...
...
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