title: Get selected value in datalist using jQuery
body: <p>Very simple and straight forward. I pre-populated a HTML datalist with values, on the form when I want select a value and insert it into SQLite database. This is my example code which is not working. Please help out.
  HTML5 datalist form creation:</p>
  
  <pre><code>&lt;input  name="TypeList" list="TypeList" placeholder="Select Type"/&gt;
  &lt;datalist id="TypeList"&gt;
      &lt;option value="State"&gt;
      &lt;option value="Area"&gt;
      &lt;option value="Town"&gt;
      &lt;option value="Street"&gt;
      &lt;option value="Number"&gt;
      &lt;option value="Local Government"&gt;
      &lt;option value="Ward"&gt;
      &lt;option value="Country"&gt;
  &lt;/datalist&gt;
  </code></pre>
  
  <p>this is the sample jquery code that did not work:</p>
  
  <pre><code>var relationshipTemp = $('#TypeList option:selected').text();
  </code></pre>