title: Twitter Bootstrap: How do I get the selected value of dropdown?
body: <p>I need to get the value a user selects from a twitter bootstrap dropdown. Once the user selects a value I want the dropdown to display that value. So, the user selects 'pending' then I want to change the selected dropdown value from that and, when the user completes the form, I want to retrieve the selected value. Would someone be able to point me in the right direction?</p>
  
  <pre><code>&lt;div class="btn-group"&gt;
    &lt;i class="dropdown-arrow dropdown-arrow-inverse"&gt;&lt;/i&gt;
    &lt;button class="btn btn-primary"&gt;status&lt;/button&gt;
    &lt;button class="btn btn-primary dropdown-toggle" data-toggle="dropdown"&gt;
      &lt;span class="caret"&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;ul class="dropdown-menu dropdown-inverse"&gt;
      &lt;li&gt;&lt;a href="#fakelink"&gt;pending&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#fakelink"&gt;active&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#fakelink"&gt;discontinued&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>