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
9e1652aa
Commit
9e1652aa
authored
10 years ago
by
Mark Otto
Browse files
Options
Download
Email Patches
Plain Diff
grunt
parent
9ac3fe6f
4 merge requests
!28721
Hot test
,
!16605
Test pull please ignore
,
!22103
test
,
!25326
Adjust examples
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dist/js/bootstrap.js
+6
-10
dist/js/bootstrap.js
dist/js/bootstrap.min.js
+1
-1
dist/js/bootstrap.min.js
docs/dist/js/bootstrap.min.js
+1
-1
docs/dist/js/bootstrap.min.js
with
8 additions
and
12 deletions
+8
-12
dist/js/bootstrap.js
+
6
-
10
View file @
9e1652aa
...
@@ -310,16 +310,14 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
...
@@ -310,16 +310,14 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
return
this
return
this
}
}
Carousel
.
prototype
.
getActiveIndex
=
function
()
{
Carousel
.
prototype
.
getItemIndex
=
function
(
item
)
{
this
.
$active
=
this
.
$element
.
find
(
'
.item.active
'
)
this
.
$items
=
item
.
parent
().
children
(
'
.item
'
)
this
.
$items
=
this
.
$active
.
parent
().
children
(
'
.item
'
)
return
this
.
$items
.
index
(
item
||
this
.
$active
)
return
this
.
$items
.
index
(
this
.
$active
)
}
}
Carousel
.
prototype
.
to
=
function
(
pos
)
{
Carousel
.
prototype
.
to
=
function
(
pos
)
{
var
that
=
this
var
that
=
this
var
activeIndex
=
this
.
get
ActiveIndex
(
)
var
activeIndex
=
this
.
get
ItemIndex
(
this
.
$active
=
this
.
$element
.
find
(
'
.item.active
'
)
)
if
(
pos
>
(
this
.
$items
.
length
-
1
)
||
pos
<
0
)
return
if
(
pos
>
(
this
.
$items
.
length
-
1
)
||
pos
<
0
)
return
...
@@ -381,10 +379,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
...
@@ -381,10 +379,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if
(
this
.
$indicators
.
length
)
{
if
(
this
.
$indicators
.
length
)
{
this
.
$indicators
.
find
(
'
.active
'
).
removeClass
(
'
active
'
)
this
.
$indicators
.
find
(
'
.active
'
).
removeClass
(
'
active
'
)
this
.
$element
.
one
(
'
slid.bs.carousel
'
,
function
()
{
// yes, "slid"
var
$nextIndicator
=
$
(
this
.
$indicators
.
children
()[
this
.
getItemIndex
(
$next
)])
var
$nextIndicator
=
$
(
that
.
$indicators
.
children
()[
that
.
getActiveIndex
()])
$nextIndicator
&&
$nextIndicator
.
addClass
(
'
active
'
)
$nextIndicator
&&
$nextIndicator
.
addClass
(
'
active
'
)
})
}
}
var
slidEvent
=
$
.
Event
(
'
slid.bs.carousel
'
,
{
relatedTarget
:
relatedTarget
,
direction
:
direction
})
// yes, "slid"
var
slidEvent
=
$
.
Event
(
'
slid.bs.carousel
'
,
{
relatedTarget
:
relatedTarget
,
direction
:
direction
})
// yes, "slid"
...
...
This diff is collapsed.
Click to expand it.
dist/js/bootstrap.min.js
+
1
-
1
View file @
9e1652aa
This diff is collapsed.
Click to expand it.
docs/dist/js/bootstrap.min.js
+
1
-
1
View file @
9e1652aa
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