Change class to change a click event on a div

Change class to change a click event on a div

Hi, Can anybody shed some light on this?

I am trying to change the click event on a "
#button_01" 
by changing the class name of the div when I click "#link_01"

It seems to change the background colour through changing class  though, so I know it is changing class.

My code:

                        <div id="button_wrp">
                            <div id="button_01" class="live_01">1</div>
                       
</div>



$("#link_01").click(function(){     
      
      
  
$("#button_wrp > div").attr("class", "live_02");
  
      
      
});

$("#link_02").click(function(){     
      
      
  
$("#button_wrp > div").attr("class", "live_01");
  
      
      
});



$("#button_01.live_01").click(function(){
$("#l_layer_01_02").hide(10,function(){
      $("#l_layer_01_01").show(10);
    });  
});
  $("#button_01.live_02").click(function(){
$("#l_layer_02_01").hide(10,function(){
      $("#l_layer_02_02").show(10);
    });  
});

Look forward to hearing any suggestions.

Regards