25 lines
608 B
JavaScript
Executable File
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',
|
|
})
|
|
}
|
|
})
|
|
}); |