onclick event for dynamic buttons

onclick event for dynamic buttons

I have a page where I want to display buttons only when a particular list item is selected.  The user can then click on one of five buttons.  I am able to put the buttons in a <div> section using this

  1.     $("li.point").click(function(){
          choice = $(this).attr('id');
          Competition = $(this).attr('title');
          Title = 'Color Prints Regular';
          var btns = '<button class="eoy" id="CR" title="Color Prints Regular" type="button">Color Prints R</button>';
          btns= btns + '<button class="eoy" id="CA" title="Color Prints Advanced" type="button">Color Prints A</button>';
          btns= btns + '<button class="eoy" id="B" title="Black & White" type="button">Black & White</button>';
          btns= btns + '<button class="eoy" id="S" title="Slide" type="button">Slide</button>';
          btns= btns + '<button class="eoy" id="DR" title="Digital Regular" type="button">Digital R</button>';
          btns= btns + '<button class="eoy" id="DA" title="Digital Advanced" type="button">Digital A</button>';
          $("h3.comp").text(Competition);
          $("div.eoy").show();
          $("div.eoy").html(btns);
          $("div.mainbottom").click();
        });
My problem is the onclick event is not working.

  1.     $("button.eoy").click(function(){
  2.       Comp = $(this).attr('id');
  3.       Title = $(this).attr('title');
  4.      $("div.mainbottom").click();
  5.     });
Any suggestions?

Art