Difference between revisions of "Template:IONIS Paris/JS"

Line 33: Line 33:
  
 
// Si on a des vidéos, on arrête le caroussel
 
// Si on a des vidéos, on arrête le caroussel
$(document).ready(function(){
+
 
console.log("ready to play.");
+
if ($('#myCarousel video').length != 0)
+
{
+
    var ret = $('.carousel').carousel({
+
    pause: true,
+
    interval: false
+
});
+
    console.log("paused as we have videos: ", ret);
+
} else {
+
    console.log("no video, let's roll!");
+
    $('#myCarousel').carousel('cycle');
+
}
+
});
+
  
 
//NB
 
//NB

Revision as of 22:55, 7 September 2015