title: drop down list click event - jQuery
body: <p>I think this will be a really easy one for anyone that is decent with jQuery, but I've got dynamically generated dropdownlists on my page, and I've set up a click event on the class, which, as expected fires a click event for all of them.  The ID of the <code>select</code> is dynamically generated, so I can't use that as the selector.  I just want to fire the event for the <code>select</code> that is actually changed.</p>
  
  <p>I need to use the id of the selected value in the function - anyone know how this is done?</p>
  
  <p>Code I have so far:</p>
  
  <pre><code>$(document).ready(function () {
      $(".boxItem").change(function () {
          var str = $(this).attr('id');
          var num = $(this).val();
          alert(num);
          var url = "/Search/GetBoxChangeInfo";
          var vmData = { json : @Html.Raw(Json.Encode(Model)),
                          id : str,
                          boxNo : num };
          $.post(url, vmData, function (data) {
              $("#column-1").html(data);
          });
      });
  });
  </code></pre>
  
  <p>Many thanks</p>