Javascript not pulling an attr value correctly
<p>For some reason whenever I click enter I get an alertbox with undefined appearing. My script should be getting the "rel" attr and then outputting it to the alertbox. Any ideas as to why this isn't happening?</p>

<p>My jQuery:</p>

<pre><code>// process addComment()
jQuery(".textbox1").keydown(function(event) {
    var keyCode = event.keyCode || event.which;
    if (keyCode === 13) {
        addComment(this);
    }
});

function addComment(e) {
    var id = jQuery(e).attr("rel");
    alert(id);
}
</code></pre>

<p>My Html:</p>

<pre><code>&lt;input placeholder="Write a comment..." id="commentBox-&lt;?php echo $row-&gt;idwallPosts; ?&gt;" class="textbox1" style="width: 423px"&gt;
</code></pre>
