I have an array of objects called "Contractors" in which each contractor will be displayed in a box on the screen so they have the properties "id", "posx" and "posy". I want to be able to change the coordinates onclick from what they are currently to a line on the bottom of the screen where they will be displayed sequentially. The code for changing the coordinates works properly but animating the boxes to those coordinates does not.
function moveto(){
$.each(Contractors, function(index, value){
$(index).animate({top: this.posy},"slow");
$(index).animate({left: this.posx},"slow");
});
}
I'm not sure where the problem is but I'm getting a problem with "Cannot read property 'Default View' of undefined". Can anyone help?