title: jQuery: Referencing the calling object(this) when the bind/click event is for a class
body: <p>Thanks for reading this.</p>
  
  <p>I am dynamically generating some data which includes a select drop-down with a text box next to it. If the user clicks the select, I am dynamically populating it (code below). I have a class on the select and I was hoping the following code would work. I tested it with an ID on the select and putting the ONE on the ID I got it to work. However, in changing the code to reference a class (since there will be multiple data groups that include a select with a text box next to it) and <code>$(this)</code>, I could not get it to work. Any ideas would be helpful. Thanks</p>
  
  <p>The relevance of the text box next to the select is the second part of the code...to update the text box when an option is selected in the select</p>
  
  <p><code>.one</code> is so the select is updated only once, then the <code>.bind</code> allows any options selected to be placed in the adjacent text box.</p>
  
  <pre><code>$('.classSelect').one("click",
   function() {
    $.ajax({
     type: "post",
     url: myURL ,
     dataType: "text",
     data: {
      '_service' : myService,
      '_program' : myProgram ,
      'param' : myParams
     },
     success:
      function(request) {
       $(this).html(request);   // populate select box
     }    // End success
    }); // End ajax method
  
    $(this).bind("click",
     function() {
      $(this).next().val($(this).val());
    }); // End BIND
   }); // End One
  
   &lt;select id="mySelect" class="classSelect"&gt;&lt;/select&gt;
   &lt;input type="text"&gt;
  </code></pre>