title: How to get the text value of a selected item from a DataList using jQuery
body: <p>How do I get the text value of the options in a DataList? 
  I need to make use of the value of an <code>id</code>, But I also need the value of the selectedIndex, which is the name.</p>
  
  <pre><code>&lt;input type="text" name="names[]" id="names" list="neym"/&gt;
  &lt;datalist id="neym"&gt;
      &lt;option value="example"&gt;&lt;/option&gt;
      &lt;option value="example2"&gt;&lt;/option&gt;
      &lt;option value="example3"&gt;&lt;/option&gt;
  &lt;/datalist&gt;
  </code></pre>
  
  <p>How do I do that in jQuery?</p>