Add a Data-test-id attribute to a <td> in my Jquery
<p>I have a <code>Table</code>, <code>Textarea</code> and a <code>Button</code>. When a user types inside the <code>Textarea</code> and then clicks on my <code>Button</code> the text gets added to the <code>Table</code> as a row with following code:</p>

<pre><code>&lt;script type="text/javascript"&gt;
 $(function() {
    $('#CustomButton').click(function() {
        $('#CustomPickedTable tbody').append(
            $('&lt;tr/&gt;',
             {
            click: function() {
                    $(this).remove();
                    },
                html: $('&lt;td/&gt;', {
                    text: $('#CustomQuestionText').val()
                })
            })
        );
        return false;
    });
});
&lt;/script&gt;
</code></pre>

<p>When a user types inside the <code>TextArea</code> and then clicks on the <code>Button</code> is that my <code>Table Tbody</code> gets this <code>&lt;td&gt;What user typed..&lt;/td&gt;</code> What I would like is that my table gets <code>&lt;td data-test-id="5"&gt;what user typed..&lt;/td&gt;.</code></p>

<p>Is there any solutions for that in my jquery so my <code>&lt;td&gt;</code> gets an data-test-id attribute?</p>

<p>Thanks in advance!</p>
