I have one div where i am dropping and appending text box, that's working perfectly but problem is I have one more div within that div (like section) where i have to drop and append same text box but it’s now dropping twice, one for inner div and other for outer div, but I want inner div only. I have tried to Google but couldn't find much help. So it will be very helpful if anyone has an idea regarding this. Thank you.
here is the code but not complete as its very complex
$(function () {
var $Drag_tbox = $("#Drag_tbox"),
$drop_box = $("#tabs-1"),
$drop_box_sec = $("#secdiv");
$Drag_tbox.draggable(
{
zIndex: 9003,
revert: "invalid",
helper: "clone",
drag: function (event, ui) {
num = 1;
return num;
}
});
$drop_box_sec.droppable({
zIndex: 9003,
drop: function (event, ui) {
if (num == 1) {
$drop_box_sec.append('<tr><td align="center"><asp:Label runat="server" Text="Label"></asp:Label><input id="Text1" type="text" /></tr></td>');
}
}
});
$drop_box.droppable({
zIndex: 9003,
drop: function (event, ui) {
if (num == 1) {
$drop_box.append('<tr><td align="center"><asp:Label runat="server" Text="Label"></asp:Label><input id="Text1" type="text" /></tr></td>');
}
}
});
});