How to add divs inside a div using jquery

Posted by Neal on Stack Overflow See other posts from Stack Overflow or by Neal
Published on 2010-04-02T12:45:32Z Indexed on 2010/04/02 12:53 UTC
Read the original article Hit count: 241

Filed under:

Hi,
I am trying to insert a div inside another div using add() of jquery but it is not working "

<div class="portlet" id="panel1">
    <div class="portlet-header">1.Feeds</div>
    <div class="portlet-content">Lorem ipsum dolor sit amet, consectetuer adipiscing elit</div>
</div>

<div class="portlet" id="panel2">
    <div class="portlet-header">2.News</div>

    <div class="portlet-content">Lorem ipsum dolor sit amet, consectetuer adipiscing elit</div>
</div>

"

"

<div class="portlet" id="panel3">
    <div class="portlet-header">3.Shopping</div>
    <div class="portlet-content">Lorem ipsum dolor sit amet, consectetuer adipiscing elit</div>

</div>

"
Actually panel1 and panel2 are inside a div, and panel3 is inside another div.I want to remove panel3 from its div and place it between panel1 and panel2 in their div.

© Stack Overflow or respective owner

Related posts about jQuery