javascript - jQuery sortable to find parent of the dropped div? -


how find parent of dropped div

$(".someclass").sortable ({      connectwith: ".someclass",      cancel: '.cart_header',      receive: function(e, ui)      {         var drag_id = ui.item.attr("id"); var parent_id = ui.item.parent().attr("id");         alert("hi"+parent_id);         var re_id = $(this).attr('id');         alert(drag_id,re_id);       }  }).disableselection(); 

lets assume,

list1 div contain following div1,div2,div3 (id).

and list2 not contain divs.

now i'm moving div1 list1 div list2 div.

in above code give result div1 , list2. need find parent div left from.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -