view static/js/sat_website.js @ 32:876ae5e23690

language selector doesn't display the language code and put the first letter un uppercase (even in French, normally no upper case but here it's the first word of a word group)
author souliane <souliane@mailoo.org>
date Tue, 27 Jan 2015 07:54:43 +0100
parents b45621706d83
children 9d553570cc61
line wrap: on
line source

$(document).ready(function() {

    // language selector
    $('#language_select').change(function() {
        $('#language_form').submit();
    });
    
    // open the big gallery when a thumbnail is clicked
    $('#carousel-screenshots .thumbnail').click(function() {
        $('#modal-screenshots').modal('show');
        index = parseInt($(this).attr('index'));
        $('#carousel-screenshots-modal').carousel(index);
        // start playing the big video
        if ($(this)[0].tagName == 'VIDEO') {
           $('#carousel-screenshots-modal img, #carousel-screenshots-modal video')[index].play();
        }
    });
    
    // thumbail's video starts playing when clicked, pause it
    $('#carousel-screenshots video.thumbnail').each(function(index) {
        $(this).on('play', function(e) { $(this)[0].pause(); });
    });

});