jquery tabs on enter key works only once
<p>I am trying to implement the jquery tab which work on enter key so that on pressing enter key the control passes to the next i wrote the following code which works only once when the page is first loaded and when i again go on first tab and trying pressing enter key to go on the next tab it doesn't work. I am using jquery tabs <a href="http://jqueryui.com/demos/tabs/" rel="nofollow">http://jqueryui.com/demos/tabs/</a>
 for this</p>

<pre><code>$("#tab-div").keypress(function (e) {

        if (e.which == 13) {
            var selected = $("#tab-div").tabs("option", "selected");
            $("#tab-div").tabs("option", "selected", selected + 1);
            return true;
        }
    });
</code></pre>

<p>Thanks,</p>
