Buttons that include html with Jinja?
<p>I'm building an app with Python and Flask. I've got a dropdown button with two options. I want it so that both of these options <code>include</code> a different html in a certain div. Is there a way to do this with Jinja? I'm pretty new to web development.</p>

<p>Here's what I've got (that doesn't work) but shows what I'm trying to do.</p>

<pre><code> &lt;div class="btn-group" role="group"&gt;
        &lt;!-- Split button --&gt;
                &lt;div class="btn-group"&gt;
                  &lt;button type="button" class="btn btn-default"&gt;Topic Modle&lt;/button&gt;
                  &lt;button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"&gt;
                    &lt;span class="caret"&gt;&lt;/span&gt;
                    &lt;span class="sr-only"&gt;Toggle Dropdown&lt;/span&gt;
                  &lt;/button&gt;
                  &lt;ul class="dropdown-menu"&gt;

                    &lt;li&gt;&lt;a href="#lsa"&gt;LSA&lt;/a&gt;&lt;/li&gt; &lt;!-- I want this button to include vis_lsa.html --&gt;

                    &lt;li&gt;&lt;a href="#lda"&gt;LDA&lt;/a&gt;&lt;/li&gt; &lt;!-- and this button to include vis_lda.html --&gt;

                  &lt;/ul&gt;
                &lt;/div&gt;

        {% if #lsa %}
         {% include 'vis_lsa.html' %}
        {% endif %}

        {% if #lda %}
         {% include 'vis_lda.html' %}
        {% endif %}

    &lt;/div&gt;
</code></pre>

<p>I've looked at the Jinja documentation for Templates but didn't find anything similar to what I'm trying to do. I'm unsure if I'd need jQuery for this instead? I don't know any jQuery, so hopefully I won't need it to do this. </p>