Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Mar 19th, 2012  |  syntax: jQuery  |  size: 0.35 KB  |  hits: 38  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $(document).ready(function() {
  2.  
  3.         $('.draggeble').draggable({
  4.                 start: function() {
  5.                         this.addClass('drag');
  6.                 }
  7.                 stop: function() {
  8.                         this.removeClass('drag');
  9.                        
  10.                         var x = this.offset().left;
  11.                         var y = this.offset().top;
  12.                        
  13.                         $.ajax({
  14.                                 url: "setplace.php",
  15.                                 type: "POST",
  16.                                 data: "x=" + x + "&y=" + y,
  17.                         });            
  18.                 }      
  19.         });
  20. });