Welcome Guest, Not a member yet? Register   Sign In
[Solved] Refreshing Just A Div With Codeigniter
#6

(This post was last modified: 10-12-2016, 05:12 AM by wolfgang1983.)

Solution now found http://stackoverflow.com/questions/39997...6#39998126

Have had to add

Code:
   $('#rep').on('click', '#vote-up-icon', function(e) {




Code:
<script type="text/javascript">
$(document).ready(function() {
   $('#rep').on('click', '#vote-up-icon', 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>
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
RE: Refreshing Just A Div With Codeigniter - by wolfgang1983 - 10-12-2016, 05:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB