How to stop of running the keycodes 37 and 39 when there is a textarea selected
<p>Simply I have a js script that change the page with left and right arrows, but how to stop that if a specific textarea is selected ?</p>

<p>This is my js to change the page</p>

<pre><code>$(document).keydown(function(event) {

    if(event.keyCode === 37) {
          window.location = "http://site.com/pics/5";
    }    
    else if(event.keyCode === 39) {
          window.location = "http://site.com/pics/7";
    }
});
</code></pre>
