Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. $(document).ready(function () {
  2. $( ".idg_row" ).draggable({
  3. helper: "clone",
  4. appendTo: "body",
  5. containment:"document",
  6. revert: true,
  7. stop: function( event, ui ) {
  8. check();
  9. }
  10. });
  11. $( ".idg_column" ).draggable({
  12. helper: "clone",
  13. appendTo: "body",
  14. containment:"document",
  15. revert: true,
  16. stop: function( event, ui ) {
  17. check();
  18. }
  19. });
  20. $( ".drop_cont" ).droppable({
  21. accept: ".idg_row",
  22. drop: function (event, ui) {
  23. ui.draggable.clone().appendTo($(this)).draggable();
  24. }
  25. });
  26. $( ".droppableC" ).droppable();
  27. });
  28.  
  29. function check() {
  30. $('.drop_cont .idg_row').addClass('droppableC');
  31. $('.drop_cont .idg_column').addClass('droppableC');
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement