replaced span link is not working

replaced span link is not working

I have a big problem with this situation. I've been looking for this problem for a week and I don't find the answer. If someone knows how can I solve it, I really appreciate. I'm a newby in jQuery.
 
My problem is simple:

 I find and replace what I need to replace but the new data link doesn't call the jQuery function ej like for unlike the first like works but when it is replaced for unlike you click unlike and doesn't call the function jquerry.
        /// like
       
        $('.like').livequery("click",function(e){

            var getID   =  $(this).attr('id').replace('post_idpl','');
           
            $.post("2.php?p_idpl="+getID, {               

            }, function(response){
               
                $('span', 'div.like-head'+getID).html('<a href="javascript: void(0)" id="post_idpl'+getID+'" class="unlike">Unlike</a>');
               
            });
        });   
       
        /// unlike
       
        $('.unlike').livequery("click",function(e){

            var getID   =  $(this).attr('id').replace('post_idpl','');
           
            $.post("3.php?p_idpu="+getID, {
   
            }, function(response){
               
                $('span', 'div.like-head'+getID).html('<a href="javascript: void(0)" id="post_idpl'+getID+'" class="like">Like</a>');
               
            });
        });   
       
       
    // ]]> 

<div class="like-head<?php echo $post_idp;?>">
         
               <span>
           
            <?php
            if($like_ip_num > 0){?>
                <a href="javascript: void(0)" id="post_idpl<?php echo $post_idp;?>" class="unlike">Unlike</a>
            <?php }else{?>
                <a href="javascript: void(0)" id="post_idpl<?php echo $post_idp;?>" class="like">Like</a>
            <?php }?>
               
            </span> 
        </div>