Skip to content

Commit

Permalink
fixes twbs#8983
Browse files Browse the repository at this point in the history
  • Loading branch information
fat committed Aug 11, 2013
1 parent b8ed111 commit 92c2ad9
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
3 changes: 1 addition & 2 deletions dist/css/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ img {
}

.img-circle {
border-radius: 500px;
border-radius: 50%;
}

hr {
Expand Down Expand Up @@ -4475,7 +4475,6 @@ a.list-group-item.active > .badge,
filter: alpha(opacity=90);
}

.carousel-control .glyphicon,
.carousel-control .icon-prev,
.carousel-control .icon-next {
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion dist/css/bootstrap.min.css

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions dist/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
Carousel.DEFAULTS = {
interval: 5000
, pause: 'hover'
, wrap: true
}

Carousel.prototype.cycle = function (e) {
Expand Down Expand Up @@ -378,12 +379,15 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
var fallback = type == 'next' ? 'first' : 'last'
var that = this

if (!$next.length) {
if (!this.options.wrap) return
$next = this.$element.find('.item')[fallback]()
}

this.sliding = true

isCycling && this.pause()

$next = $next.length ? $next : this.$element.find('.item')[fallback]()

var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })

if ($next.hasClass('active')) return
Expand Down
2 changes: 1 addition & 1 deletion dist/js/bootstrap.min.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions javascript.html
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,12 @@ <h3>Options</h3>
<td>"hover"</td>
<td>Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.</td>
</tr>
<tr>
<td>wrap</td>
<td>boolean</td>
<td>true</td>
<td>Whether the carousel should cycle continuously or have hard stops.</td>
</tr>
</tbody>
</table>
</div><!-- /.bs-table-scrollable -->
Expand Down
8 changes: 6 additions & 2 deletions js/carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
Carousel.DEFAULTS = {
interval: 5000
, pause: 'hover'
, wrap: true
}

Carousel.prototype.cycle = function (e) {
Expand Down Expand Up @@ -105,12 +106,15 @@
var fallback = type == 'next' ? 'first' : 'last'
var that = this

if (!$next.length) {
if (!this.options.wrap) return
$next = this.$element.find('.item')[fallback]()
}

this.sliding = true

isCycling && this.pause()

$next = $next.length ? $next : this.$element.find('.item')[fallback]()

var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })

if ($next.hasClass('active')) return
Expand Down

0 comments on commit 92c2ad9

Please sign in to comment.