I have this code so far:
$(document).ready(function () { $('.rows').change(row); function row() { var rownumber = $('.rows input').val(); $('.form-del-field').trigger('click'); //Deletes all rows for (i=0; i < rownumber; i++){ $('#q4').trigger('click'); //create each new row } }; });
Which adds rows to my table based on the number input into a field with the css class 'rows'.
The issue I'm running into is some of the lookups are breaking when I use this. I believe this is because it executes too quickly. How can I add just a 1 second or so delay before executing this?
Thanks