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
eb3333a6
Commit
eb3333a6
authored
11 years ago
by
fat
Browse files
Options
Download
Email Patches
Plain Diff
fix
#7000
parent
0f64c210
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
docs/assets/js/bootstrap.js
+4
-4
docs/assets/js/bootstrap.js
docs/assets/js/bootstrap.min.js
+1
-1
docs/assets/js/bootstrap.min.js
docs/examples/carousel.html
+3
-3
docs/examples/carousel.html
js/carousel.js
+3
-2
js/carousel.js
with
11 additions
and
10 deletions
+11
-10
docs/assets/js/bootstrap.js
+
4
-
4
View file @
eb3333a6
...
...
@@ -437,12 +437,13 @@
var
$this
=
$
(
this
),
href
var
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
))
//strip for ie7
var
options
=
$
.
extend
({},
$target
.
data
(),
$this
.
data
())
var
slideIndex
var
slideIndex
=
$this
.
attr
(
'
data-slide-to
'
)
if
(
slideIndex
)
options
.
interval
=
false
$target
.
carousel
(
options
)
if
(
slideIndex
=
$this
.
attr
(
'
data-slide-to
'
))
{
$target
.
data
(
'
bs.carousel
'
).
pause
().
to
(
slideIndex
)
.
cycle
()
$target
.
data
(
'
bs.carousel
'
).
to
(
slideIndex
)
}
e
.
preventDefault
()
...
...
@@ -612,8 +613,7 @@
var
parent
=
$this
.
attr
(
'
data-parent
'
)
var
$parent
=
parent
&&
$
(
parent
)
console
.
log
(
data
,
data
&&
data
.
transitioning
)
if
(
data
&&
!
data
.
transitioning
)
{
if
(
!
data
||
!
data
.
transitioning
)
{
if
(
$parent
)
$parent
.
find
(
'
[data-toggle=collapse][data-parent=
'
+
parent
+
'
]
'
).
not
(
$this
).
addClass
(
'
collapsed
'
)
$this
[
$
(
target
).
hasClass
(
'
in
'
)
?
'
addClass
'
:
'
removeClass
'
](
'
collapsed
'
)
}
...
...
This diff is collapsed.
Click to expand it.
docs/assets/js/bootstrap.min.js
+
1
-
1
View file @
eb3333a6
This diff is collapsed.
Click to expand it.
docs/examples/carousel.html
+
3
-
3
View file @
eb3333a6
...
...
@@ -279,7 +279,7 @@ body {
</ol>
<div
class=
"carousel-inner"
>
<div
class=
"item active"
>
<img
data-src=
"holder.js/1500x500/auto/#
777
:#7a7a7a/text:First slide"
alt=
""
>
<img
data-src=
"holder.js/1500x500/auto/#
F00
:#7a7a7a/text:First slide"
alt=
""
>
<div
class=
"container"
>
<div
class=
"carousel-caption"
>
<h1>
Example headline.
</h1>
...
...
@@ -289,7 +289,7 @@ body {
</div>
</div>
<div
class=
"item"
>
<img
data-src=
"holder.js/1500x500/auto/#
777
:#7a7a7a/text:Second slide"
alt=
""
>
<img
data-src=
"holder.js/1500x500/auto/#
0F0
:#7a7a7a/text:Second slide"
alt=
""
>
<div
class=
"container"
>
<div
class=
"carousel-caption"
>
<h1>
Another example headline.
</h1>
...
...
@@ -299,7 +299,7 @@ body {
</div>
</div>
<div
class=
"item"
>
<img
data-src=
"holder.js/1500x500/auto/#
777
:#7a7a7a/text:Third slide"
alt=
""
>
<img
data-src=
"holder.js/1500x500/auto/#
00F
:#7a7a7a/text:Third slide"
alt=
""
>
<div
class=
"container"
>
<div
class=
"carousel-caption"
>
<h1>
One more for good measure.
</h1>
...
...
This diff is collapsed.
Click to expand it.
js/carousel.js
+
3
-
2
View file @
eb3333a6
...
...
@@ -189,12 +189,13 @@
var
$this
=
$
(
this
),
href
var
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
))
//strip for ie7
var
options
=
$
.
extend
({},
$target
.
data
(),
$this
.
data
())
var
slideIndex
var
slideIndex
=
$this
.
attr
(
'
data-slide-to
'
)
if
(
slideIndex
)
options
.
interval
=
false
$target
.
carousel
(
options
)
if
(
slideIndex
=
$this
.
attr
(
'
data-slide-to
'
))
{
$target
.
data
(
'
bs.carousel
'
).
pause
().
to
(
slideIndex
)
.
cycle
()
$target
.
data
(
'
bs.carousel
'
).
to
(
slideIndex
)
}
e
.
preventDefault
()
...
...
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