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 9125109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:43:32+00:00 2026-06-17T06:43:32+00:00

I have a div in a HTML file <div id=abc hidden=hidden> <div id=statIndicator> <span

  • 0

I have a div in a HTML file

"<div id="abc" hidden="hidden">
        <div id="statIndicator">
            <span id="imgInd" class="status-indicator-border">
                <img src="../../LibSrc/SharedResources/IMG/loading-trace.gif" />
            </span><span id="messageIndicator">Updating Plots...</span>
        </div>
    </div>"

I insert the statIndicator div in another div using append.
so that div becomes

<div id="parentDiv">
 <div id="statIndicator">
                <span id="imgInd" class="status-indicator-border">
                    <img src="../../LibSrc/SharedResources/IMG/loading-trace.gif" />
                </span><span id="messageIndicator">Updating Plots...</span>
            </div>
</div>

On refresh I write $(‘#parentDiv’).empty() it deletes whatever is inside the ‘parentDiv’.
But when I try to append statIndicator using $(‘#statIndicator’), it return “[]”, though I have the ‘statIndicator’ div in Html.

Is there a way in which I can get the ‘statIndicator’ div?

  • 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-06-17T06:43:33+00:00Added an answer on June 17, 2026 at 6:43 am

    I think jquery.append() moves the selected elements without making a copy. So you can explicitly create a copy using the .clone() method and append it’s result. Something like:

    $('#abc #statIndicator').clone().appendTo('#parentDiv');
    

    This is creating a copy and then appending it at the new location.

    Once you do this there will be two divs with the same id, so it will be a good idea to always reference the statIndicator’s parent container in your selectors.

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

Sidebar

Related Questions

I have an HTML file which contains the following line: <div><img src=img1.gif><br>My Text</div> I'm
Hi everyone in my main html file, I have this div that some img
I have the following code snippet from a HTML file: <div id=rwImages_hidden style=display:none;> <img
I have html that looks like this, <div> <span>Text <a href=example.html>ABC</a> <a href=example.html>DEF</a> <a
I have the following HTML file: <!-- this is column 1 --> <div class=repairGuruBoxRC>
I have a <div> in My.html file: <html><head> <script type=text/javascript language=javascript src= path/biz.path.nocache.js></script></head> <div
I have a html file <div class=ads_list_admin> {$dlt_msg} {foreach name = fe1 item =
Within an html file I have a menu set up as: <div id=informheader class=topmenu>
I have one html file like this one. <body class=iphone onLoad=doSomething()> <div id=title_wrapper><h2 id=title>[[[TITOLO]]]</h2></div>
I have a file like <div> <div class=abc> <div> <!--some more divs inside--> </div>

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.