div containment problem
div containment problem
Hi all.. plz reply to the problem if u hav a solution..
I hav parent div inside it I hav two other div and those two are sortable....
I set the "containment:parent" to the parent div... so tat other two div should be inside the parent div.. but the other two divs are not contained inside the parent.. the other two div position is relative...
see the code snippet below.... and help me figure it out..
$("#header_holder_div").sortable({--------> parentdiv
containment:'parent',
stop: function(event, ui) {
var p = $("#horizontal_navigation");---------> 1stchild div
var offset1 = p.offset();
store_position_sort('horizontal_navigation',offset1.left,offset1.right,offset1.top,offset1.bottom);
var d = $("#header");------> 2nd child div
var offset = d.offset();
store_position_sort('header',offset.left,offset.right,offset.top,offset.bottom);
}
}); Here, I m just storin the positions in database... main thing is those two divs not contained in the parent div..