Home › Forums › JavaScript › JS Add/Remove Row in Table › Reply To: JS Add/Remove Row in Table
September 4, 2013 at 10:47 am
#149028
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).