Script arret carousel
This commit is contained in:
parent
f9232cc85e
commit
6847f6535a
@ -947,6 +947,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function(){
|
||||||
|
var windowHeight = window.innerHeight || document.documentElement.clientHeight
|
||||||
|
|
||||||
|
$('.carousel').carousel('pause');
|
||||||
|
$('.carousel').toArray().forEach(function(element) {
|
||||||
|
var rect = element.getBoundingClientRect();
|
||||||
|
if(rect.top <= windowHeight && rect.bottom >= 0) {
|
||||||
|
element.carousel('cycle');
|
||||||
|
} else {
|
||||||
|
element.carousel('pause');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<?php include('contact.html'); ?>
|
<?php include('contact.html'); ?>
|
||||||
|
|
||||||
<?php include('footer.html'); ?>
|
<?php include('footer.html'); ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user