On my script I am able to submit my query form and then it refreshes the div OK
How ever it only seems to refresh once if I click it multiple times will not refresh
Any suggestions on what best way is?
How ever it only seems to refresh once if I click it multiple times will not refresh
Any suggestions on what best way is?
Code:
if (response.success == true) {
$('.rep').load(window.location.href + ' .rep');
}Code:
<script type="text/javascript">
$(document).ready(function() {
$('#vote-up-icon').on('click', function(e) {
e.preventDefault();
$.ajax({
url: "<?php echo base_url('thread/voteup/');?><?php echo $thread_id;?>",
type: 'post',
dataType: 'json',
data: {
voteup: $(this).parent().find('#vote_up').val()
},
success: function(response){
if (response.success == true) {
$('.rep').load(window.location.href + ' .rep');
}
}
});
});
});
</script>