1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-22 22:55:26 +03:00

Improve carousel sliding behaviour, rewind on slide begin, play on slide end

This commit is contained in:
Maxime Coste 2015-10-18 15:31:25 +01:00
parent 007cd09d5a
commit 46cf2fa83f

View File

@ -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();
}
});
}