title: show button only if following div tag has some value
body: <p>I have following html code - which displays a button and user clicks on it - it display
  some text below.</p>
  
  <pre><code>&lt;div&gt;
   &lt;button class="btn-default btn-primary show-answer-button"&gt;Show&lt;/button&gt;
   &lt;div class="answer"&gt;&lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>But sometimes, when user clicks the button, there is no text . (so it displays nothing).
  I would like to display this button only when the "answer" has some text. How to achieve this ? </p>
  
  <p>I tried following (adding a id='answer-part' and insert a line at js file) but it didn't work:</p>
  
  <pre><code> &lt;div id="answer-part"&gt;
   &lt;button class="btn-default btn-primary show-answer-button"&gt;Show&lt;/button&gt;
   &lt;div class="answer"&gt;&lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>and add this at .js file </p>
  
  <pre><code>$('.answer-part:empty').hide();
  </code></pre>