mirror of
https://github.com/ae-utbm/sith.git
synced 2025-03-28 16:17:11 +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");
|
|
}
|
|
});
|
|
|
|
});
|