diff --git a/src/carousel/carousel.js b/src/carousel/carousel.js index 4e9edd21ee..a4609515f8 100644 --- a/src/carousel/carousel.js +++ b/src/carousel/carousel.js @@ -19,7 +19,7 @@ angular.module('ui.bootstrap.carousel', ['ui.bootstrap.transition']) /* direction: "prev" or "next" */ self.select = function(nextSlide, direction) { - var nextIndex = slides.indexOf(nextSlide); + var nextIndex = jQuery.inArray(nextSlide, slides); //Decide direction if it's not given if (direction === undefined) { direction = nextIndex > currentIndex ? "next" : "prev"; @@ -38,8 +38,9 @@ angular.module('ui.bootstrap.carousel', ['ui.bootstrap.transition']) if (self.currentSlide && angular.isString(direction) && !$scope.noTransition && nextSlide.$element) { //We shouldn't do class manip in here, but it's the same weird thing bootstrap does. need to fix sometime nextSlide.$element.addClass(direction); - nextSlide.$element[0].offsetWidth = nextSlide.$element[0].offsetWidth; //force reflow - + if (!$.browser.msie) { // offsetWidth not settable in IE + nextSlide.$element[0].offsetWidth = nextSlide.$element[0].offsetWidth; //force reflow + } //Set all other slides to stop doing their stuff for the new transition angular.forEach(slides, function(slide) { angular.extend(slide, {direction: '', entering: false, leaving: false, active: false}); @@ -72,7 +73,7 @@ angular.module('ui.bootstrap.carousel', ['ui.bootstrap.transition']) /* Allow outside people to call indexOf on slides array */ self.indexOfSlide = function(slide) { - return slides.indexOf(slide); + return jQuery.inArray(slide, slides); }; $scope.next = function() { @@ -152,7 +153,7 @@ angular.module('ui.bootstrap.carousel', ['ui.bootstrap.transition']) self.removeSlide = function(slide) { //get the index of the slide inside the carousel - var index = slides.indexOf(slide); + var index = jQuery.inArray(slide,slides); slides.splice(index, 1); if (slides.length > 0 && slide.active) { if (index >= slides.length) { diff --git a/template/carousel/carousel.html b/template/carousel/carousel.html index 97fad9f3f1..453d664e85 100644 --- a/template/carousel/carousel.html +++ b/template/carousel/carousel.html @@ -3,6 +3,6 @@
  • - - + + diff --git a/template/pagination/pagination.html b/template/pagination/pagination.html index dec9c8f7cf..53e29966a0 100644 --- a/template/pagination/pagination.html +++ b/template/pagination/pagination.html @@ -1,4 +1,4 @@ diff --git a/template/tabs/tab.html b/template/tabs/tab.html index aedd7ef379..38abfecb6f 100644 --- a/template/tabs/tab.html +++ b/template/tabs/tab.html @@ -1,3 +1,3 @@
  • - {{heading}} + {{heading}}