my script works but i don't understand how to make it NOT launch the functions when in a textarea/input and those keys are pressed. aka: launch the event when the user presses that key, unless the user is in a textarea/input.
$('body').keyup(function (event) {
var direction = null;
if (event.keyCode == 37) {
$('#wrapper').fadeOut(500)
} else if (event.keyCode == 39) {
$('html,body').animate({scrollTop: $('body').offset().top}, {duration: 1500, easing: 'easeInOutQuart'}
)
return false;
}
})