0 Replies - 278 Views - Last Post: 08 September 2011 - 06:59 PM

#1 newbie14  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 15-May 11

Drag and drop not functioning properly after ajax call.

Posted 08 September 2011 - 06:59 PM

Dear All,
I have page at this link http://183.78.169.53...ddTyreSwap2.php, so if you select the drop down list you see the list of tyres appear and you can drag and drop accordingly. The problem it loose the original functionality as per this page http://183.78.169.53...etails1.php?l=3 for instance in here when you drag only a copy is being drag and can drop only on the droppable and not other area? What is my mistake below is my snippet of the code which does the reassign of the drag n drop. I guess some slight tweaking will do it right?

$("select#vehicleLayoutID").change(function(){
		var data = $(this).val();
		$vehicleLayoutIDArray=$('#vehicleLayoutID').val().split("#");;
		//alert("value :"+$vehicleLayoutID);
		//alert("value :"+$('#vehicleLayoutID').val());
		$.post('getTyreLayoutDetails.php', {l: $vehicleLayoutIDArray[0]}, function(data){
			$('#layoutDetails').html(data);
			
			$('.t1 span.droppable').each(function(){
				//alert("DROP");
				$(this).droppable();

			});
			$('.t1 span img.draggable').each(function(){
				//alert("drag");
				 $(this).draggable();

			});
		});	
	});


Is This A Good Question/Topic? 0
  • +

Page 1 of 1