I am trying to append a row to table. However, the row contents are complicated (it has inline listeners, plugins, href, etc). So, I would like to know what would be the best way to build this row. These are my options
Should I create a long string and set to row.innerHTML and call the plugins once the row is append to table
Should I create a separate .php file that creates the row and pass variables to set my values and then load the resulting html through ajax.
Should create element by element using document.createElement()
and setting the values.
Or is there any other alternative that I should consider and provides a decent performance?
I forgot, what about cloning the row and changing the values?