Move character on map on clicked position
问题 I've got a map which is can be moved around by changing margin-top and margin-left logic. When I click on arrows, jQuery changes the left/top margins and the whole map moves, so it looks like my character is moving. Now I want to be able to move to anywhere I click on specified map position. $("#up").on("click", function(e) { var offset = parseInt($("#map").css("margin-top")); offset+=16; $("#map").css("margin-top", offset + "px"); }); $("#down").on("click", function(e) { var offset =