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

[ad_1]

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

[ad_2]

solved Set a tr id in jQuery [closed]