I have a simple D & D script, as you can see here:
http://demo.superdit.com/jquery/dragdrop_cart/
Now it works fine until Im trying to add products with AJAX (after loading the page)
Here is an AJAX call (regular AJAX)
$.ajax({
url: "Search.php",
dataType: 'json',
type: 'GET',
data: "ebayq="+value,
success: function(data){
globalRequest = 0;
resultContainer2.fadeOut('fast', function() {
resultContainer2.html('');
var html2 = [];
for (var i = 0; i < items.length; ++i)
{
html2 += '<label class="title"><a href="'+viewitem+'" target="_blank">'+title+'</a></label>';html2 += '<img src="'+pic+'">';
html2 += ' <label class="price">New Price: '+myprice+'</label>';
html2 += '</div>';
resultContainer2.append(html2);
}
I think because these elements load after the page loads and do not recognize them as draggable elements.
Is there a way to make these AJAX elements draggable ??
Many thanks!
source
share