Created
November 11, 2015 09:51
-
-
Save frknbasaran/8f4bb2a6656b27eb28ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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