add selected attribute to option javascript

This is my function to add a attribute to my row: You are appending to the table when you should be appending to the cell. How to prevent number input in JavaScript/JQuery. See this issue for more information. The