Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6922615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:25:46+00:00 2026-05-27T10:25:46+00:00

Example code: jQueryElement.append(jQueryOtherElement.remove(#some-selector)) Will this make a copy of my element and append it

  • 0

Example code:

jQueryElement.append(jQueryOtherElement.remove("#some-selector"))

Will this make a copy of my element and append it or will it actually use the DOM objects?

Basically, I’m wondering if the above code is using innerHTML and if so, is there a way (in jQuery?) to append the DOM nodes after removing them from another location.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:25:46+00:00Added an answer on May 27, 2026 at 10:25 am

    It will actually use the DOM objects removed by the .remove() call – it is not using innerHTML, but rather the actual DOM nodes. There is no need to copy as the previous DOM objects were removed from the DOM and are available to be inserted.

    If you look at the jQuery 1.7 code, the remove function internally calls:

    elem.parentNode.removeChild( elem )
    

    which just removes the node from the DOM. The nodes are all left in the jQuery object so when you then call append on that jQuery object, they are all still available to be appended directly with any copy or conversion.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Example code: element.addEventListener('click',function () { this.style.backgroundColor = '#cc0000' //after element was clicked once what
Many C++ books contain example code like this... std::cout << Test line << std::endl;
There is this example code, but then it starts talking about millisecond / nanosecond
Does anyone have an example (code or a link) that will allow me to
This example code fails: require(socket) require(ssl) -- TLS/SSL server parameters local params = {
I tried the example code from this side to learn the SuggestBox in GWT.
Example code: http://jsfiddle.net/slolife/PnmxM/ I am asking this even though there are a number of
Example code so I can start explaining this problem: <div style=z-index:5>5</div> <div style=z-index:2>2</div> <div
This example code is a short version of my actual program: import java.awt.BorderLayout; import
Looking at the example code on MSDN : This ' Declares a type. Dim

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.