comparison static/js/sat_website.js @ 54:d54f2f09a73a

fixes displaying two carousels on the same page
author souliane <souliane@mailoo.org>
date Tue, 05 May 2015 11:03:18 +0200
parents 9d553570cc61
children
comparison
equal deleted inserted replaced
53:84c2e20d3de1 54:d54f2f09a73a
12 } else { 12 } else {
13 $('#id_payment_method_group').hide(); 13 $('#id_payment_method_group').hide();
14 } 14 }
15 }); 15 });
16 16
17 // open the big gallery when a thumbnail is clicked
18 $('#carousel-screenshots .thumbnail').click(function() {
19 $('#modal-screenshots').modal('show');
20 index = parseInt($(this).attr('index'));
21 $('#carousel-screenshots-modal').carousel(index);
22 // start playing the big video
23 if ($(this)[0].tagName == 'VIDEO') {
24 $('#carousel-screenshots-modal img, #carousel-screenshots-modal video')[index].play();
25 }
26 });
27
28 // thumbail's video starts playing when clicked, pause it
29 $('#carousel-screenshots video.thumbnail').each(function(index) {
30 $(this).on('play', function(e) { $(this)[0].pause(); });
31 });
32
33 }); 17 });