Bind a click value to a dynamically generated list.

Bind a click value to a dynamically generated list.

Hi, I am using a dynamic list with the code below to populate the <daytime> list.  What I would like to know is how I can bind a click value to the dynamicaly generated list items?

Thanks in advance,
Lammie.

  1. $('#listDetail').attr("data-theme", "a").removeClass("ui-btn-up-b").addClass("ui-btn-up-a"); 
  2.  var size = this.text;
  3.          var jdetail = $("#daytime");
  4.          jdetail.html("<li data-role='list-divider' data-theme='c'>Available Riders</li> ");
  5.          
  6. for($n=1;$n<(team[lt].length);$n++){
  7.             var item = this;
  8.             var jrecord = $("<li><a href='#shirt' data-transition='slide'></a></li>");
  9.             jrecord.find("a:first").text($n);
  10.             jdetail.append(jrecord);
  11.           };
  12.           jdetail.listview("refresh","true");
  13. });

  14. // This is the listing in the code:

  15. <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="e" id="daytime" style="border:2px solid #FFF; border-radius:10px;">
  16.      <li><a href="#">Page</a></li>
  17. </ul>