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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:26:48+00:00 2026-06-14T17:26:48+00:00

I have a page where a plugin adds child div’s to a parent div

  • 0

I have a page where a plugin adds child div’s to a parent div at random time interval.
The basic structure is :

<div id="parent">
<div class="child" someattr="abc">content1</div>
<div class="child" someattr="xyz">content2</div>
</div>

I tried the following to detect adding of elements and it works

var c = document.getElementById('parent');
c.__appendChild = c.appendChild;
c.appendChild = function(){
     alert("Added");
     c.__appendChild.apply(c, arguments);     
}

I got the above from an answer in stackoverflow itself.
What I would also like to do is to get the contents of the child divs.
That is, their attributes and the content inside.
What would be the easiest/best way to go on this.
I wouldn’t mind if the solution is jquery

  • 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-14T17:26:49+00:00Added an answer on June 14, 2026 at 5:26 pm

    No jQuery needed:

    document.getElementById('parent').innerHTML;
    

    Of course you could use jQuery as well, because it might help you get the individual children:

    $('#parent .child').each(
        function(){ 
             // In this context, 'this' points to the current child element in the itertion
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the Quickflip 2 plugin ( http://jonraasch.com/blog/quickflip-2-jquery-plugin/comment-page-3#comment-3562 ) to have images flip
I have silverlight plugin on my page and some functionality to show panel as
I have a WordPress plugin with settings page. On this settings page, the form
I have implemented the Jquery cycle plugin on my page but I can't get
Using the jquery metadata plugin, I have an element on my page that looks
I have a page that uses Ryan Bates nested_form plugin . The plugin is
I have a Firefox plugin that adds some optional features to my web app.
I'm writing a plugin that adds a page with a tag [deposit_page]; that tag
I'mt trying to create a plugin which adds a custom page in the admin
I have a page that uses the jQuery.swfobject plugin to embed 5 flash items

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.