The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript JS Add/Remove Row in Table Reply To: JS Add/Remove Row in Table


Nice job!

Ok, there’s surely room for improvement. For example: why did you use $('body').on('click', 'myClass' ...) when you could simply use $('.myClass').on('click' ...)?

Also, when hidding part of your form, you could use a better selector for turning those inputs ‘readonly’. Maybe use $('#' +i+ ' input') or some other solution like that (I’m not being specific here, just think you can work something out in the future).