Hooking into the change() event on jQuery .toChecklist
<p>I'm experiencing a problem when I attempt to use the .change() event on select lists, using the jQuery .toChecklist  plugin.</p>

<p>My page contains a number of select lists, which are changed to CheckLists, using jQuery. </p>

<p>Consider the following Javascript snippet:</p>

<pre><code>for (var i=0;i&lt;5;i++)
{
  var selectListId = 'selectList' + i;

  // Assume this line represents the outputting on a 
  // standard select list

  // Convert to Checklist
  $("#" + selectListId).toChecklist();
  $("#" + selectListId).change
  (
    function ()
    {
      alert("SelectListId: " + selectListId);
    }
  );
}
</code></pre>

<p>For each iteration of this loop, I output a multi-select list, convert it to Checklist, and then add the .change() handler.</p>

<p>However, when the page renders (visually, everything is fine), choosing an option from ANY of the lists gives the alert text of "SelectListId: selectList4" (ie. the last list id of the loop). Thus it appears that each invocation of .change() globally replaces the change handler.</p>

<p>Does anyone know how to change the code so that each checklist has its own change handler (so that the first change handler would output "SelectListId: selectList0", etc).</p>

<p>Thanks,</p>
