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

Home Forums JavaScript How to replicate buttons in jQuery?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #43880

    Hi, I m learning jquery , and I m stuck at a point.
    I m trying to create a form for my practice and I want the fields to replicate itself when a + button is clicked but instead of showing the whole code I m just going to ask the part where I m having problem.

    So here is the question,
    I want the buttons to replicate itself when clicked. However only the first button is producing buttons but I wanted all the buttons to do the same thing.

    I have written the function on CLICK of ‘replicate’ class , and when the first button produces buttons they also have the same class ‘replicate’ applied to them. Then why is this function not working on them but only working for the first button?
    I was looking more for an explanation than a solution. Please help.


    Thanks , that was really helpfull. Now I undertand.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.