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
48a8dd2a
Commit
48a8dd2a
authored
12 years ago
by
Kevin Attfield
Browse files
Options
Download
Email Patches
Plain Diff
Added test to fix for
#5362
parent
82715ae9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/tests/unit/bootstrap-tab.js
+19
-0
js/tests/unit/bootstrap-tab.js
with
19 additions
and
0 deletions
+19
-0
js/tests/unit/bootstrap-tab.js
+
19
-
0
View file @
48a8dd2a
...
@@ -58,4 +58,23 @@ $(function () {
...
@@ -58,4 +58,23 @@ $(function () {
.
tab
(
'
show
'
)
.
tab
(
'
show
'
)
})
})
test
(
"
show and shown events should reference correct relatedTarget
"
,
function
()
{
var
dropHTML
=
'
<ul class="drop">
'
+
'
<li class="dropdown"><a data-toggle="dropdown" href="#">1</a>
'
+
'
<ul class="dropdown-menu">
'
+
'
<li><a href="#1-1" data-toggle="tab">1-1</a></li>
'
+
'
<li><a href="#1-2" data-toggle="tab">1-2</a></li>
'
+
'
</ul>
'
+
'
</li>
'
+
'
</ul>
'
$
(
dropHTML
).
find
(
'
ul>li:first a
'
).
tab
(
'
show
'
).
end
()
.
find
(
'
ul>li:last a
'
).
on
(
'
show
'
,
function
(
event
){
equals
(
event
.
relatedTarget
.
hash
,
"
#1-1
"
)
}).
on
(
'
shown
'
,
function
(
event
){
equals
(
event
.
relatedTarget
.
hash
,
"
#1-1
"
)
}).
tab
(
'
show
'
)
})
})
})
\ No newline at end of file
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