JSFiddle - React, Tailwind, and code Playground
by kougiland
HTML
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<body onload="initPage()">
<div class="start" id="point"></div>
</body>
CSS
#point {
position: absolute;
background-color: black;
width: 15px;
height: 15px
}
JavaScript
var json = [
{'x' : '300' , 'y' : '200'},
{'x' : '250' , 'y' : '150'},
{'x' : '209' , 'y' : '387'},
{'x' : '217' , 'y' : '323'},
{'x' : '261' , 'y' : '278'},
{'x' : '329' , 'y' : '269'},
{'x' : '406' , 'y' : '295'}
];
function initPage() {
$.each(json, function() {
$("#point").animate({
left: this.x,
top: this.y
},
"linear");
});
}