Guest User

Untitled

a guest
Jul 9th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.36 KB | None | 0 0
  1.  
  2. $(document).ready(function() {
  3.  
  4.     $('.draggeble').draggable(
  5.         start: function() {
  6.             this.addClass('drag');
  7.         };
  8.         stop: function() {
  9.             this.removeClass('drag');
  10.            
  11.             var x = this.offset().left;
  12.             var y = this.offset().top;
  13.            
  14.             $.ajax({
  15.                 url: "setplace.php",
  16.                 type: "POST",
  17.                 data: "x=" + x + "&y=" + y,
  18.             });    
  19.         }; 
  20.     });
  21. });
Add Comment
Please, Sign In to add comment