samedi 30 juillet 2016

Close popup with key Esc

I try to close popup when I press Esc but it only works while video isn't on play.

$(document).bind('keydown', function (e) {
    if(e.which === 27){
        $('#youmax-video-lightbox').attr('src', '');
        $('#youmax-lightbox').hide();
    }
});

U can see in: http://www.vigerm.com/videos

Aucun commentaire:

Enregistrer un commentaire