Forums

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

#149028
cav_dan
Participant

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).