I implemented draggable image using jQuery-ui Draggable and saved coordinates into database.
Now I am getting coordinates and images url in xml format.
I want to reset the image position. where it was saved.
============= Here is source code:=============
$.ajax({
type: "GET",
url: "devices.xml",
dataType: "xml",
success: function(xml) {
$(xml).find('device').each(function(){
var idText = $(this).attr('id');
var longAddress = $(this).find('longAddress').text();
var imgSrc = $(this).find('type').text();
var xAxis = $(this).find('x-axis').text();
var yAxis = $(this).find('y-axis').text();
var oNewImg = document.createElement('img');
oNewImg.id = idText;
oNewImg.src = imgSrc;
document.body.appendChild(oNewImg);
var originalLeft = parseInt($('#'+oNewImg.id).position().left);
$('#'+oNewImg.id).css('left', (xAxis) + 'px');
$('#'+oNewImg.id).css('top', (yAxis) + 'px');});