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
6ac5708a
Commit
6ac5708a
authored
Jun 11, 2014
by
Jacob
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13787 from twbs/fat-3731
fix #13185 - keyboard support for carousel
parents
4949d26a
a1dad14f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
js/carousel.js
js/carousel.js
+13
-3
No files found.
js/carousel.js
View file @
6ac5708a
...
...
@@ -18,7 +18,7 @@
// =========================
var
Carousel
=
function
(
element
,
options
)
{
this
.
$element
=
$
(
element
)
this
.
$element
=
$
(
element
)
.
on
(
'
keydown.bs.carousel
'
,
$
.
proxy
(
this
.
keydown
,
this
))
this
.
$indicators
=
this
.
$element
.
find
(
'
.carousel-indicators
'
)
this
.
options
=
options
this
.
paused
=
...
...
@@ -28,8 +28,8 @@
this
.
$items
=
null
this
.
options
.
pause
==
'
hover
'
&&
this
.
$element
.
on
(
'
mouseenter
'
,
$
.
proxy
(
this
.
pause
,
this
))
.
on
(
'
mouseleave
'
,
$
.
proxy
(
this
.
cycle
,
this
))
.
on
(
'
mouseenter
.bs.carousel
'
,
$
.
proxy
(
this
.
pause
,
this
))
.
on
(
'
mouseleave
.bs.carousel
'
,
$
.
proxy
(
this
.
cycle
,
this
))
}
Carousel
.
VERSION
=
'
3.1.1
'
...
...
@@ -40,6 +40,16 @@
wrap
:
true
}
Carousel
.
prototype
.
keydown
=
function
(
e
)
{
switch
(
e
.
which
)
{
case
37
:
this
.
prev
();
break
case
39
:
this
.
next
();
break
default
:
return
}
e
.
preventDefault
()
}
Carousel
.
prototype
.
cycle
=
function
(
e
)
{
e
||
(
this
.
paused
=
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