Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
151
rated 0 times [  155] [ 4]  / answers: 1 / hits: 82802  / 15 Years ago, wed, september 9, 2009, 12:00:00

This should work right? I have not a clue as to why it's not. I have to be doing something wrong.



<div id=randomdiv>text</div>
<a id=refresh>click</a>

<script>
$(function() {
$(#refresh).click(function() {
$(#randomdiv).load(index.php)
})
})
</script>

More From » jquery

 Answers
8

What happen if you do this?



<a id=refresh href=#>click</a>

<script>
$(function() {
$(#refresh).click(function(evt) {
$(#randomdiv).load(index.php)
evt.preventDefault();
})
})
</script>

[#98725] Saturday, September 5, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
breap

Total Points: 606
Total Questions: 96
Total Answers: 108

Location: Djibouti
Member since Sun, Feb 27, 2022
2 Years ago
breap questions
Thu, Jun 24, 21, 00:00, 3 Years ago
Wed, Mar 18, 20, 00:00, 4 Years ago
Mon, Oct 7, 19, 00:00, 5 Years ago
;