title: How to make element hide if not having any string value
body: <p>I have a error email message in Paragraph tag but when there is no text i want to hide the paragraph tag.</p>
  
  <p>This is html</p>
  
  <pre><code> &lt;p class="errorpara" id="errorpara"&gt;
  &lt;%= correct%&gt; 
  &lt;/p&gt;
  </code></pre>
  
  <p>This is javascript code </p>
  
  <pre><code>var message = $(".errorpara").text();
                var txtLength = message.length;
                  if(txtLength &lt; 2 )
                  {
                     document.getElementById("errorpara").display = "none";
                  } 
  </code></pre>