Should this work correctly? I have no idea why this is not so. I have to do something wrong.
<div id="randomdiv">text</div> <a id="refresh">click</a> <script> $(function() { $("#refresh").click(function() { $("#randomdiv").load("index.php") }) }) </script>
What happens if you do this?
<a id="refresh" href="#">click</a> <script> $(function() { $("#refresh").click(function(evt) { $("#randomdiv").load("index.php") evt.preventDefault(); }) }) </script>