Forums

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

Home Forums JavaScript Having trouble using AppendTo on elements with same class

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #204046
    mdyorke
    Participant

    Hi all, I am trying to use appendTo to move a div into another. The problem I am facing is that this is a repeating element with the same classes so it finds every instance and appends to all.

    Here is a link to view on codepen: http://codepen.io/mdyorke/pen/MwELQQ

    Instead of it returning:

    Test Title
    Appending Content 1
    Appending Content 2


    Test Title
    Appending Content 1
    Appending Content 2

    Id like it to return:

    Test Title
    Appending Content 1


    Test Title
    Appending Content 2

    Thanks in advance for any help on this!

    Mike

    #204047
    mdyorke
    Participant

    I did some more research and found a solution! I updated the codepen just incase someone else runs into the same problem.

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