Jquery like image changing mechanism is not working -
i created program in php , jquery . here jquery code: $(document).ready(function(){ $(".likethis").click(function(event){ event.preventdefault(); var id = $(this).attr("href"); $.ajax({ url: '<?php echo site_url().'users/likevideo/'; ?>'+id, success: function(data) { var d =data.split('~'); if(d[0]==2){ alert('you must login like-dislike video!'); }else if(d[0]==3){ alert('you liked video'); }else if(d[0]==1){ $(".like_ico").html(d[1]); $(".dilike_ico").html(d[2]); $("#like_box").html('<a href="#" class="likeedthis"><img src="<?php echo base_url(); ?>images/like.jpg" /