I am trying to make auto-refresh every 5 second to div
with ajax interval but, i missing something.
This is my div code:
<script>
function loadlink(){
$('#chart').load(function () {
$(this).unwrap();
});
}
loadlink(); // This will run on page load
setInterval(function(){
loadlink() // this will run after every 5 seconds
}, 5000);
</script>
<div id="chart" >{!! $chart->script() !!}</div>
</div>