I am using Jquery to go through an array and make a new table row for each element in the array.
At the end of each row I want a submit button with the value Add To Cart.
Here’s some relevant code:
var addToCartCell = document.createElement('td');
$(tableRow).append(addToCartCell);
To add the submit button, so far I have tried:
$("<input type='submit' value='Add To Cart'").appendTo(addToCartCell);
And,
$(addToCartCell).append("<input type='submit' value='Add To Cart'");
But to no avail
You’re missing a closing angle bracket in each case. Try: