I am trying to get the position of a specific div when it is dropped. With some help i have put together the code bellow. I added in the last bit to try and get the specific values but it simply returns [object Object] instead of something like [0,0] or [0,120].
So the question is how do i get the actual values from the array?
Here is a jsFiddle
$(function() {
$('.AppList').droppable({
accept: ".App",
tolerance: 'fit',
drop: function(event, ui) {
var apps = $(".App"),
positions = [];
$.each(apps, function (index, app) {
var positionInfo = $(app).position();
positions.push(positionInfo);
});
var Time = positions.slice(0,1);
var x=document.getElementById("posThis");
x.innerHTML=Time;
console.log(positions);
}
});
});