Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
68b771a0
Commit
68b771a0
authored
10 years ago
by
Ben-Russell
Committed by
Heinrich Fenkart
10 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Independently delegate data-api selectors
Fixes
#14462
. Closes #14463 by merging it.
parent
94b544c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
js/carousel.js
+6
-2
js/carousel.js
js/dropdown.js
+3
-1
js/dropdown.js
js/tab.js
+6
-2
js/tab.js
with
15 additions
and
5 deletions
+15
-5
js/carousel.js
+
6
-
2
View file @
68b771a0
...
@@ -207,7 +207,7 @@
...
@@ -207,7 +207,7 @@
// CAROUSEL DATA-API
// CAROUSEL DATA-API
// =================
// =================
$
(
document
).
on
(
'
click.bs.carousel.data-api
'
,
'
[data-slide], [data-slide-to]
'
,
function
(
e
)
{
var
clickHandler
=
function
(
e
)
{
var
href
var
href
var
$this
=
$
(
this
)
var
$this
=
$
(
this
)
var
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
))
// strip for ie7
var
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
))
// strip for ie7
...
@@ -223,7 +223,11 @@
...
@@ -223,7 +223,11 @@
}
}
e
.
preventDefault
()
e
.
preventDefault
()
})
}
$
(
document
)
.
on
(
'
click.bs.carousel.data-api
'
,
'
[data-slide]
'
,
clickHandler
)
.
on
(
'
click.bs.carousel.data-api
'
,
'
[data-slide-to]
'
,
clickHandler
)
$
(
window
).
on
(
'
load
'
,
function
()
{
$
(
window
).
on
(
'
load
'
,
function
()
{
$
(
'
[data-ride="carousel"]
'
).
each
(
function
()
{
$
(
'
[data-ride="carousel"]
'
).
each
(
function
()
{
...
...
This diff is collapsed.
Click to expand it.
js/dropdown.js
+
3
-
1
View file @
68b771a0
...
@@ -154,6 +154,8 @@
...
@@ -154,6 +154,8 @@
.
on
(
'
click.bs.dropdown.data-api
'
,
clearMenus
)
.
on
(
'
click.bs.dropdown.data-api
'
,
clearMenus
)
.
on
(
'
click.bs.dropdown.data-api
'
,
'
.dropdown form
'
,
function
(
e
)
{
e
.
stopPropagation
()
})
.
on
(
'
click.bs.dropdown.data-api
'
,
'
.dropdown form
'
,
function
(
e
)
{
e
.
stopPropagation
()
})
.
on
(
'
click.bs.dropdown.data-api
'
,
toggle
,
Dropdown
.
prototype
.
toggle
)
.
on
(
'
click.bs.dropdown.data-api
'
,
toggle
,
Dropdown
.
prototype
.
toggle
)
.
on
(
'
keydown.bs.dropdown.data-api
'
,
toggle
+
'
, [role="menu"], [role="listbox"]
'
,
Dropdown
.
prototype
.
keydown
)
.
on
(
'
keydown.bs.dropdown.data-api
'
,
toggle
,
Dropdown
.
prototype
.
keydown
)
.
on
(
'
keydown.bs.dropdown.data-api
'
,
'
[role="menu"]
'
,
Dropdown
.
prototype
.
keydown
)
.
on
(
'
keydown.bs.dropdown.data-api
'
,
'
[role="listbox"]
'
,
Dropdown
.
prototype
.
keydown
)
}(
jQuery
);
}(
jQuery
);
This diff is collapsed.
Click to expand it.
js/tab.js
+
6
-
2
View file @
68b771a0
...
@@ -141,9 +141,13 @@
...
@@ -141,9 +141,13 @@
// TAB DATA-API
// TAB DATA-API
// ============
// ============
$
(
document
).
on
(
'
click.bs.tab.data-api
'
,
'
[data-toggle="tab"], [data-toggle="pill"]
'
,
function
(
e
)
{
var
clickHandler
=
function
(
e
)
{
e
.
preventDefault
()
e
.
preventDefault
()
Plugin
.
call
(
$
(
this
),
'
show
'
)
Plugin
.
call
(
$
(
this
),
'
show
'
)
})
}
$
(
document
)
.
on
(
'
click.bs.tab.data-api
'
,
'
[data-toggle="tab"]
'
,
clickHandler
)
.
on
(
'
click.bs.tab.data-api
'
,
'
[data-toggle="pill"]
'
,
clickHandler
)
}(
jQuery
);
}(
jQuery
);
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
Menu
Explore
Projects
Groups
Snippets