Append DOM Element

by Zuhaib Siddiqui

HTML

<div class="head">
<input type="text" name="add-cal">
</div>
    <div class="list">
        <ul>
            <li>Text 01</li>
        </ul>
    </div>
    <p>a shaj gshjg a hs ghags jhagshja gshjgash</p>

CSS

.head{
    padding:10px;
    border:1px solid #cfcfcf;
}
ul{
    list-style:none;
    margin:0px;
}
.list{
    width:100%;
    float:left;
}
.list ul li{
    padding:10px;
    /*border-bottom:1px solid #cfcfcf;*/
    margin-bottom:10px;
}

JavaScript

// Add Property add one property for multi elements;
$('li').add('.head').add('p').css({"background":"#888"});

$('li').add('Test').appendTo('.list ul');