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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:29:09+00:00 2026-06-10T15:29:09+00:00

I have generated html like this: <div class=row> <div class=item google></div> <div class=item mail></div>

  • 0

I have generated html like this:

<div class="row">
   <div class="item google"></div>
   <div class="item mail"></div>
   <div class="item apps"></div>
   <div class="item plus"></div>
</div>
<div class="row">
   <div class="item google"></div>
   <div class="item mail"></div>
   <div class="item apps"></div>
   <div class="item plus"></div>
</div>

and I want to put other items inside google

<div class="row">
   <div class="item google">
     <div class="group">
       <div class="item mail"></div>
       <div class="item apps"></div>
       <div class="item plus"></div>
     </div>
  </div>
</div>
<div class="row">
  <div class="item google">
     <div class="group">
       <div class="item mail"></div>
       <div class="item apps"></div>
       <div class="item plus"></div>
     </div>
  </div>
</div>

I am creating group div:

jQuery("div.google").append('<div class="group"></div>');

but I when I do .append I adds all insted of

    jQuery("div.row > div.google > div.group").append(jQuery("div.mail"));

I have two divs with class mail. how to target only parent. Edit: http://jsfiddle.net/H6MYh/1/

  • 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-10T15:29:11+00:00Added an answer on June 10, 2026 at 3:29 pm

    try the following code:

    jQuery("div.google").append('<div class="group"></div>');
    jQuery("div.google").each(function(){
        var $this = jQuery(this);
        $this.siblings().appendTo($this.find('.group'));
    });
    

    EDIT:
    for specific div:(not tested)

    jQuery("div.google").each(function(){
        var $this = jQuery(this);
        $this.next('.mail').appendTo($this.find('.group'));
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this html: <div class=speaker-list> <div class=view-content> <div class=views-row views-row-1 views-row-odd views-row-first> <div
I have some HTML like this: <div id=SomeID> <div class=Wrapper> <input type=checkbox class=SomeCheckboxClass> <input
I have asp.net generated html code. I want execute jQuery click function when user
I have a simple app with a full screen UIWebView. This contains HTML generated
I have a table like this below. And there is a div container with
A really simple question. For example, I have a class like this: .someclass {
I have docbook generated HTML that contains small, fixed size images. All these images
I have some auto-generated HTML code. When I add a float:left; on the shared
I have various pieces of generated HTML/JS that I load into Activity with WebView#loadDataWithBaseURL.
I have a web application written in pure JavaScript (no pre-generated HTML except for

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.