Skip to content

Instantly share code, notes, and snippets.

@frknbasaran
Created November 11, 2015 09:51
Show Gist options
  • Save frknbasaran/8f4bb2a6656b27eb28ed to your computer and use it in GitHub Desktop.
Save frknbasaran/8f4bb2a6656b27eb28ed to your computer and use it in GitHub Desktop.
$(function() {
function init5() {
$('#bes').draggable({
cursor: 'move',
containment: 'document',
stop: handleDragStop
});
}
function handleDragStop(event, ui) {
var offsetXPos = parseInt(ui.offset.left);
var offsetYPos = parseInt(ui.offset.top);
$.ajax({
type: 'POST',
data: 'x=' + offsetXPos + '&y=' + offsetYPos,
url : 'phpSayfam.php',
success: function (response) {
console.log("koordinatlar sunucuya gitti")
},
error: function () {
console.log("sıçtık çaktırma");
}
});
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment