I have this bit of script to reload a div on a click - which works for what I need it to do.
I want to add a delay to the reload of say 1-2 seconds with a load icon before it loads. I looked at setTimeout but I don't know where to put it.
https://codepen.io/jameswill77/pen/vYRpxVV
<a href="" id="something">click</a>
<div id="mydiv">
//content
</div>
</div>
setTimeout(function(){
$('#something').link(function() {
$("#mydiv").reload();
});
}, 10000);