title: Dynamically add Bootstrap panels
body: <p>This is the problem. I'm trying to add panels dynamically into my project.</p>
  
  <p>I got inspiration from this <a href="https://stackoverflow.com/questions/18825975/add-dynamic-closed-panels-in-bootstrap-3-accordion">Add dynamic closed panels in Bootstrap 3 accordion</a></p>
  
  <p>But I'm having a hard time to make it do what I want I to do. I want to press "Add stock", and a bootstrap popover appears. You search for your stock (or whatever) and it appears in a facebook like search bar (later problem). And you select what you have searched for. And when you press Submit, the popover closer and a new panel is created, with the choosen name as its topic. But I should not be created at the bottom of the page, it should be created in a specific place on the page. Like at the bottom of a chosen div.</p>
  
  <p>So, a hidden template.</p>
  
  <pre><code>&lt;div class="panel panel-default template"&gt;
      &lt;div class="panel-heading"&gt;STOCK NAME &lt;button type="button" class="btn btn-default btn-xs" id="popover3"&gt;&lt;span class="glyphicon glyphicon-plus marker" data-toggle="tooltip" title="Add buy and sells"&gt;&lt;/span&gt;&lt;/button&gt;&lt;/div&gt;
      &lt;div class="panel-body"&gt;
          &lt;p&gt;&lt;/p&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Notice the button in the template. I asked another question here: <a href="https://stackoverflow.com/questions/20904220/dynamically-input-filds">https://stackoverflow.com/questions/20904220/dynamically-input-filds</a> for that. It should also be dynamically.</p>
  
  <p><a href="http://jsfiddle.net/hn9ft/1/" rel="nofollow noreferrer">jsfiddel demo</a></p>