title: Get selected id from drop-down list (select box) using jQuery
body: <p>I have been searching for a way to get the <code>id</code> from a drop-down list option, when it is selected. I have found the following:
  <a href="https://stackoverflow.com/questions/1643227/get-selected-text-from-drop-down-list-select-box-using-jquery?rq=1">Get selected text from a drop-down list (select box) using jQuery</a><br>
  And tried to change the accepted answer to:</p>
  
  <pre><code>$("#yourdropdownid option:selected").id;
  </code></pre>
  
  <p>But when I <code>alert()</code> it, it gives me "undefined". Is there a way to get the id using JQuery?</p>