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:
parent
007cd09d5a
commit
46cf2fa83f
10
js/app.js
10
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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user