On my website I display some advertisements and it should be loaded like this:
<div id='ad'>
http://ad.affiliate.com/?id=12345
</div>
But when I use that script, the ad can slow down the loading time of the website. How can I load that script after the page has loaded? I tried this but that doesn't work.
<div id='ad'>
<script type="text/javascript">
$(document).ready(function(){
$("#ad").load("http://ad.affiliate.com/?id=12345");
});
</script>
</div>
Thanks!