Links after .html() problem

Links after .html() problem

Hi there!
I'm trying to modify this tutorial:  http://tutorialzine.com/2010/03/sponsor-wall-flip-jquery-css/ in order to add a button to flip the boxes and another to close them. I'm stuck because after adding the content with .html() the '.close' button doesn't work and I don't really understant why... Would you please give me a clue? 
THANK YOU!!!

  1. $(document).ready( function (){
  2. $( '.open' ).on( "click" , function (){
  3. var elem = $( this ).closest(". sponsorFlip ");

  4. if (elem.data( 'flipped' ))
  5. {
  6. elem.revertFlip();
  7. elem.data( 'flipped' , false )
  8. }
  9. else
  10. {

  11. elem.flip({
  12. direction: 'rl' ,
  13. speed: 250 ,
  14. onBefore: function (){
  15.                                           //PROBLEM 1: THE <p class="close">CLOSE</p> INSIDE .sponsorData DOESN'T WORK AFTER .html() INSERT
  16. elem.html(elem.siblings( '.sponsorData' ).html());
  17. }
  18. });
  19. elem.data( 'flipped' , true );
  20.                   // this code is to revert all the flipped boxes
  21.                               $(".sponsorFlip").not(elem).each(function(){
  22.                                            if($(this).data("flipped")){
  23.                                                 // PROBLEM 2: I HAVE TO MODIFY THE TRIGGER IN ORDER TO EXECUTE THE .close CLICK EVENT
  24.                                                    $(this).trigger("click",[true]);
  25.                                               }
  26.                                     });
  27.   }
  28. });
  29. $(".close").on("click",function(){
  30.       alert("I'd like to revert the flipped box when I'm here. I know I should remove the if/else from .open click event");
  1. });
  2. });