I have a checkbox where when it’s clicked, .load() will be called. The requested page loads just fine except that jQuery keeps requesting page over and over again.
<script type="text/javascript">
$(document).ready(function($) {
$('#we').click(function() {
$('#we_div').load('/form_url');
});
});
</script>
<div id="we_div" style="float:right;"><input type="checkbox" id="we" /><label for="we">Some dummy text here.</label></div>
Can anyone tell me what’s wrong with this?
@Shef gave the idea. Try this safer method