3Dstudy/js/script.js
2017-12-07 14:00:06 +01:00

25 lines
608 B
JavaScript
Executable File

$(document).ready(function() {
console.log("ready");
$(document).on('keydown', function(e){
if(e.which == 37){
$("#char-container").css({
'left': '-=2rem',
})
}
if(e.which == 38){
$("#char-container").css({
'top': '-=2rem',
})
}
if(e.which == 39){
$("#char-container").css({
'left': '+=2rem',
})
}
if(e.which == 40){
$("#char-container").css({
'top': '+=2rem',
})
}
})
});