mirror of
https://github.com/ae-utbm/sith3.git
synced 2024-08-27 21:01:03 +00:00
25 lines
592 B
JavaScript
25 lines
592 B
JavaScript
|
$(document).ready(function(){
|
||
|
|
||
|
$("#poster_list #view").click(function(e){
|
||
|
$("#view").removeClass("active");
|
||
|
});
|
||
|
|
||
|
$("#poster_list .poster .image").click(function(e){
|
||
|
|
||
|
el = $(e.target);
|
||
|
if(el.hasClass("image"))
|
||
|
el = el.find("img")
|
||
|
$("#poster_list #view #placeholder").html(el.clone());
|
||
|
|
||
|
$("#view").addClass("active");
|
||
|
});
|
||
|
|
||
|
$(document).keyup(function(e) {
|
||
|
if (e.keyCode == 27) { // escape key maps to keycode `27`
|
||
|
e.preventDefault();
|
||
|
$("#view").removeClass("active");
|
||
|
}
|
||
|
});
|
||
|
|
||
|
});
|