title: How to get value from multiple combobox using jQuery
body: <p>I have multiple combobox with different name. Please see the code below:</p>
  
  <pre><code>for($i= 1 ; $i &lt;= 5 ; $i++)
  {
  ?&gt;
      &lt;select class="department" name="department[]" id="&lt;?php echo $i; ?&gt;"&gt;
          &lt;option value=""&gt;Choose Department &amp; HOD&lt;/option&gt;
  
          &lt;?php
          $qHOD = oci_parse($c1, "SELECT H.HOD_ID, H.HOD, H.DEPARTMENTID_FK, D.DEPARTMENTID, D.DEPARTMENTNAME, D.LOCATIONID_FK FROM WA_GA_TBL_HOD H, WA_GA_TBL_DEPARTMENTS D WHERE H.DEPARTMENTID_FK = D.DEPARTMENTID AND D.LOCATIONID_FK = 'LC0001' ORDER BY D.DEPARTMENTNAME ASC");
          oci_execute($qHOD);
          while($dHOD = oci_fetch_array($qHOD))
          {
          ?&gt;
              &lt;option value="&lt;?php echo $dHOD['HOD_ID']; ?&gt;"&gt;&lt;?php echo $dHOD['DEPARTMENTNAME']; ?&gt; - &lt;?php echo $dHOD['HOD']; ?&gt;&lt;/option&gt;
          &lt;?php
          }
          ?&gt;
      &lt;/select&gt;
  &lt;?php
  }
  ?&gt;
  </code></pre>
  
  <p>Now I want to get the value of the combobox.</p>
  
  <p>I'm using this:</p>
  
  <pre><code>$(".department").bind("change", function(e)
  {
      var department = $(".department").val(); 
      alert(department);
  });
  </code></pre>
  
  <p>But I didn't get any value.</p>
  
  <p>How to do the trick?</p>