title: Reference JS object to DOM element
body: <p>How can I reference specific DOM element to specific JS object?
  For example, i have an array of customers. Using jQuery, for each customer I create LI with checkbox and span for customers name. When checkbox is clicked, I need to do some processing on that customer JS object. The question, how  i can get this JS object an easy way.
  Currently I have following:</p>
  
  <pre><code>$(customers).each(function(){
  $("&lt;li&gt;").append($("&lt;input type=\"checkbox\"").attr("id","chk_" + this.ID)).append($("&lt;span&gt;").text(this.Name)).appendTo("#ulCustomers");
  });
  
  $("#ulCustomers input[type=checkbox]").bind("click",function(){
  
  var customerId = $(this).attr("id").replace("chk_","");
  var CustomerObj = $(customers).filter(function () { return this.ID == customerId }).get(0);
  
  myProcess(CustomerObj); //Two above two lines are just for select correct customer from array.
  });
  </code></pre>
  
  <p>I believe in world of JS and jQuery exists more elegant way to do it.
  Thanks</p>