[Solved] Set a tr id in jQuery [closed]


http://api.jquery.com/html/

The html() function gets the html string. Then when you pass it in to $(), JQuery is creating html elements that are the same as your content and are not part of the DOM.

Instead you should just use:

$('#id').prop('id', 'id' + cnt);

0

solved Set a tr id in jQuery [closed]