Conditional display of a div in a post if specific tag exists
<p>I am working on a custom Tumblr HTML template. Within each post (= li including class "post") I want to hide a div that includes the class "callToAction" <strong>but only if</strong> the post contains a tag with the name "#id-Original".</p>

<p>What I tried so far this CSS to hide the call to action div by default</p>

<pre><code>.callToAction {
display:none;
}
</code></pre>

<p>And then this JQuery statement to show the call to action if a post contains the "id-Original" tag.</p>

<pre><code>if ($('#id-Original')) {
  $('#id-Original').closest('li.post').css('background-color', '#005580');
  $('#id-Original').closest('.callToAction').css('display', 'block');
}
</code></pre>

<p><strong>→ Current Problem: while the background color changes based on the tag. The Call to Action div always stays hidden.</strong></p>

<p>The HTML (excerpt of 2 posts, one with a "id-Original" tag and one without)</p>

<pre><code>              &lt;li class="post photo textcentered"&gt;
                    &lt;div class="row"&gt;
                        &lt;div class="span12 textcentered"&gt;
                        ...
                        &lt;/div&gt;
                    &lt;/div&gt;
                    &lt;div class="row"&gt;
                        &lt;div class="span12 addSpaceAtTop photocaption"&gt;
                            &lt;p&gt;Week #1 [Non-Original]&lt;/p&gt;
                            &lt;ul class="tags"&gt;
                                    &lt;li&gt;
                                        &lt;a href="..." id="id-Weekly"&gt;Weekly&lt;/a&gt;
                                    &lt;/li&gt;
                             &lt;/ul&gt;                
                        &lt;/div&gt;
                        &lt;div class="span12 addspace callToAction"&gt;
                            &lt;p&gt;&lt;a class="addspaceright" href="..."&gt;Download Original Size&lt;/a&gt; &lt;a class="btn" href="/submit"&gt;Upload Your Version&lt;/a&gt;
                            &lt;/p&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;  
                &lt;/li&gt;

                &lt;li class="post photo textcentered"&gt;
                    &lt;div class="row"&gt;
                        &lt;div class="span12 textcentered"&gt;
                            ...
                        &lt;/div&gt;
                    &lt;/div&gt;
                    &lt;div class="row"&gt;
                        &lt;div class="span12 addSpaceAtTop photocaption"&gt;
                            &lt;p&gt;Week #2 [Original]&lt;/p&gt;
                            &lt;ul class="tags"&gt;
                                    &lt;li&gt;
                                        &lt;a href="..." id="id-Original"&gt;Original&lt;/a&gt;
                                    &lt;/li&gt;
                                    &lt;li&gt;
                                        &lt;a href="..." id="id-Weekly"&gt;Weekly&lt;/a&gt;
                                    &lt;/li&gt;
                             &lt;/ul&gt;                
                        &lt;/div&gt;
                        &lt;div class="span12 addspace callToAction"&gt;
                            &lt;p&gt;&lt;a class="addspaceright" href="..."&gt;Download Original Size&lt;/a&gt; &lt;a class="btn" href="/submit"&gt;Upload Your Version&lt;/a&gt;
                            &lt;/p&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;  
                &lt;/li&gt;
</code></pre>
