To add&remove nested(two-level) input elements dynamically?

You would need to rebind the onclick events to the new html elements created in your new group. So after copying the HTML, you would need to do $("#btn_addQues). Click("etc..."), so you might want to think about creating reusable functions for them.

You would need to rebind the onclick events to the new html elements created in your new group. So after copying the HTML, you would need to do $("#btn_addQues). Click("etc..."), so you might want to think about creating reusable functions for them.

However, if you are going to use ids they need to be unique.

I'm not sure I understand, but do you mean that since it has multiple add&remove answer buttons. I should rebind an unique id for each of them? – user878729 Oct 31 at 20:00 Right now you bind the onclick event to document.ready.So when the page is rendered it is going to find all the elements that exist at that time, and run your bindings.

When you click a button, and create new HTML, that extra HTML was not in the DOM at the time of the original binding. So to add an on click event to that new HTML, it needs to have the binding event triggered after the HTML is generated... And yes, you would need a unique id for every element on the page, otherwise you should use classes.ID's should always be a way to identify a unique element in the DOM. – Patrick Nov 1 at 12:38.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions