<script type="text/javascript"> function Load () { $.ajax({ url: "index.php", cache: false, async: false, success: function(html){ $("#wrap").append(html);} }); } $("#onje").click(function () { alert("ready"); setTimeout('Load()',20) }) </script>