title: Get selected value from Bootstrap 3 selectpicker
body: <p>I have a select which I am trying to use with bootstrap 3 by using the <code>selectpicker</code> class. I want to be able to get the data from the option the user selects so I'm using the <code>jquery onchange</code> for my <code>selectpicker</code>. I'm pretty confident with finding the selected value and what not from a regular select but when the html gets rendered for the bootstrap selectpicker, it's done differently. My original select gets a <code>display: none;</code> style added to it and then it generates a ssecond div containing all my option items.
  <img src="https://i.stack.imgur.com/2XD8M.png" alt="enter image description here"></p>
  
  <p>Here is my select in my template:</p>
  
  <pre><code>        &lt;select id="buildings" class="selectpicker" data-width="80%" data-live-search="true" style="border-radius:0px;" &gt;
              {% for category in building_categories %}
                  &lt;optgroup label="{{ category.asBuildingCategory }}"&gt;
                      {% for building in buildings %}
                          &lt;option data-content="&lt;span data-latitude='{{building.building.decLatitude}}' data-longitude='{{building.building.decLongitude}}' data-build-id='{{building.building.ixBuilding}}'&gt;{{building.building.asBuilding}}&lt;/span&gt;"&gt;&lt;/option&gt;
                      {% endfor %}
                  &lt;/optgroup&gt;
              {% endfor %}
          &lt;/select&gt;
  </code></pre>
  
  <p>I have to add a <code>data-content</code> since  bootstrap selectpicker won't have my custom data elements after it's rendered its own way.</p>
  
  <p>Now I've seen someone else has done pretty much what I'm doing except mine just won't work. <a href="https://stackoverflow.com/questions/25720986/bootstrap-select-how-to-fire-event-on-change">Bootstrap-select - how to fire event on change</a>. The value returned is simply "" because I'm assuming it has something to do with my <code>select</code> getting a <code>display: none;</code> added</p>