From: Mark Otto Date: Thu, 1 May 2014 00:43:43 +0000 (-0700) Subject: Merge pull request #11966 from colllin/noconflict X-Git-Tag: v3.2.0~216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f20f66604b27d86ed132f7186560443e9603d313;p=thirdparty%2Fbootstrap.git Merge pull request #11966 from colllin/noconflict Fix #11464 - JS noConflict() mode not working in 3.0.x --- f20f66604b27d86ed132f7186560443e9603d313 diff --cc js/tests/unit/carousel.js index a4008bb0c7,ece18553e1..8657ee00a8 --- a/js/tests/unit/carousel.js +++ b/js/tests/unit/carousel.js @@@ -63,21 -72,9 +72,21 @@@ $(function () ok(e.direction) ok(e.direction === 'right' || e.direction === 'left') start() - }).carousel('next') + }).bootstrapCarousel('next') }) + test('should fire slid event with direction', function () { + var template = '' + $.support.transition = false + stop() + $(template).on('slid.bs.carousel', function (e) { + e.preventDefault() + ok(e.direction) + ok(e.direction === 'right' || e.direction === 'left') + start() + }).carousel('next') + }) + test('should fire slide event with relatedTarget', function () { var template = '' $.support.transition = false @@@ -89,23 -86,9 +98,23 @@@ ok($(e.relatedTarget).hasClass('item')) start() }) - .carousel('next') + .bootstrapCarousel('next') }) + test('should fire slid event with relatedTarget', function () { + var template = '' + $.support.transition = false + stop() + $(template) + .on('slid.bs.carousel', function (e) { + e.preventDefault() + ok(e.relatedTarget) + ok($(e.relatedTarget).hasClass('item')) + start() + }) + .carousel('next') + }) + test('should set interval from data attribute', 4, function () { var template = $('') template.attr('data-interval', 1814)