diff --git a/js/app.js b/js/app.js index 00cc5652a..3fb5026f5 100644 --- a/js/app.js +++ b/js/app.js @@ -4,11 +4,17 @@ var cs_demos = $("#carousel-demos"); if (cs_demos) { - cs_demos.on("slid.bs.carousel", function (e) { + cs_demos.on("slide.bs.carousel", function (e) { var video = $(e.relatedTarget).find("video"); - if (video) { video[0].currentTime = 0; + video[0].pause(); + } + }); + cs_demos.on("slid.bs.carousel", function (e) { + var video = $(e.relatedTarget).find("video"); + if (video) { + video[0].play(); } }); }