mirror of https://github.com/twbs/bootstrap.git
				
				
				
			grunt
This commit is contained in:
		
							parent
							
								
									9ac3fe6fcf
								
							
						
					
					
						commit
						9e1652aa50
					
				|  | @ -310,16 +310,14 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re | |||
|     return this | ||||
|   } | ||||
| 
 | ||||
|   Carousel.prototype.getActiveIndex = function () { | ||||
|     this.$active = this.$element.find('.item.active') | ||||
|     this.$items  = this.$active.parent().children('.item') | ||||
| 
 | ||||
|     return this.$items.index(this.$active) | ||||
|   Carousel.prototype.getItemIndex = function (item) { | ||||
|     this.$items = item.parent().children('.item') | ||||
|     return this.$items.index(item || this.$active) | ||||
|   } | ||||
| 
 | ||||
|   Carousel.prototype.to = function (pos) { | ||||
|     var that        = this | ||||
|     var activeIndex = this.getActiveIndex() | ||||
|     var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) | ||||
| 
 | ||||
|     if (pos > (this.$items.length - 1) || pos < 0) return | ||||
| 
 | ||||
|  | @ -381,10 +379,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re | |||
| 
 | ||||
|     if (this.$indicators.length) { | ||||
|       this.$indicators.find('.active').removeClass('active') | ||||
|       this.$element.one('slid.bs.carousel', function () { // yes, "slid"
 | ||||
|         var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) | ||||
|         $nextIndicator && $nextIndicator.addClass('active') | ||||
|       }) | ||||
|       var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) | ||||
|       $nextIndicator && $nextIndicator.addClass('active') | ||||
|     } | ||||
| 
 | ||||
|     var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
 | ||||
|  |  | |||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
		Reference in New Issue