Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function () {
- $( ".idg_row" ).draggable({
- helper: "clone",
- appendTo: "body",
- containment:"document",
- revert: true,
- stop: function( event, ui ) {
- check();
- }
- });
- $( ".idg_column" ).draggable({
- helper: "clone",
- appendTo: "body",
- containment:"document",
- revert: true,
- stop: function( event, ui ) {
- check();
- }
- });
- $( ".drop_cont" ).droppable({
- accept: ".idg_row",
- drop: function (event, ui) {
- ui.draggable.clone().appendTo($(this)).draggable();
- }
- });
- $( ".droppableC" ).droppable();
- });
- function check() {
- $('.drop_cont .idg_row').addClass('droppableC');
- $('.drop_cont .idg_column').addClass('droppableC');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement