Hi all i am working on jquery here i have my html like this
<div class="grid row-fluid">
<div>
<span class="span1">
<input type="checkbox" class="regular-checkbox" id="Header" />
<label for="Header"></label>
</span>
<span class="span1"> <img class="img-polaroid" src="http://placehold.it/140x140"></span>
</div>
<div>
<span class="span1">
<input type="checkbox" class="regular-checkbox" id="Header" />
<label for="Header"></label>
</span>
<span class="span1"> <img class="img-polaroid" src="http://placehold.it/140x140"></span>
</div>
</div>
<div class="span7" style="border:1px black" id="separate">
<ul class="thumbnails bootstrap-examples pre-scrollable">
<li class="span2">
<a href="#">
//image shold add here
</a>
</li>
</ul>
</div>
in the above code i have a images and checkbox ok now i have one empty div now i want to add those image to the empye div once
i select it the checked images only
$(function () {
$('input[type="checkbox"]').click(function () {
AddToCart(this);
});
});
function AddToCart(obj) {
var $this = $(obj).closest('div');
var img = $this.find('img');
$('#separate').append(img);
}
how to add image from one div to another div using jquery could u plz help me to do this thanks in advance
This is what you can do: