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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:25:37+00:00 2026-05-26T04:25:37+00:00

Ok relevant HTML: <div rel= id=CartridgeDisplays class=category section > <h3 class=categoryTitle parent>Cartridge Displays</h3> </div>

  • 0

Ok relevant HTML:

<div rel="" id="CartridgeDisplays" class="category section ">
    <h3 class="categoryTitle parent">Cartridge Displays</h3>                
</div>

<div rel="" id="ColdCastBronzeresinFigurines" class="category section ">
    <h3 class="categoryTitle">Cold Cast Bronze resin Figurines</h3>             
</div>

<div rel="CartridgeDisplays" id="Collectableitems" class="category section child">
    <h3 class="categoryTitle">Collectable items</h3>                
</div>

<div rel="CartridgeDisplays" id="CommercialDisplaysandClocks" class="category section child">
    <h3 class="categoryTitle">Commercial Displays and Clocks</h3>               
</div>

And this jQuery:

<script type="text/javascript">
    $(document).ready(function(){
        $('.child').appendTo($('# + $(this).attr('rel') + '));
    }); 
</script>

So what i want to happen is on page load, is all the DIV’s with a class of ‘child’ to be appended to the DIV that has the same id as the class:child DIV’s rel attribute. Can anyone help with this?

  • 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-26T04:25:38+00:00Added an answer on May 26, 2026 at 4:25 am

    Your string concatenation is wrong. It should be: '#' + $(this).attr('rel'). And you’ll need to put it in a call to .each().

    $('.child').each(function() {
        $(this).appendTo('#' + $(this).attr('rel'));
    });
    

    Explanation: in your code, $(this) refers to the document. In order to refer to the .child div, you need to iterate through them.

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

Sidebar

Related Questions

The relevant snippet of HTML: <span class=a> <div class=fieldname>Question 1</div> <input type=text value= name=q1
Here is the relevant HTML: <div class=row> <div class=arrow box>&#9668;</div>Month Year<div class=dayMonth box></div>&#9658;<div class=arrow
Here's the relevant code: <div data-bind=foreach: chats, visible: chats().length > 0> <input data-bind='value: $parent.newCommentText'
Here's the relevant HTML: <div id=navcontainer> <ul id=navlist> <li><a href=#tab1>Item one</a></li> <li><a href=#tab2>Item two</a></li>
Why is it when I do something like http://jsfiddle.net/sUhn9/ Added relevant HTML <div id=container
Relevant Code Snippet: public class MyPreference extends Preference { public MyPreference(Context context, AttributeSet attrs)
I'm trying to make an auto-login using Greasemonkey. Can anyone help me? Relevant HTML
Here is a short snippet of HTML (it contains all relevant HTML and javascript
I have my html containers as follows and it has number of levels. <div
EDIT: Here is the code exactly as it is in my file: Relevant HTML:

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.