title: How to hide the login and register button after user login
body: <p>What I want is to hide the login and register section of the html after user logs in with his account, but it doesn't seem to be working.</p>
  
  <p>Here is the HTML and JavaScript code:</p>
  
  <pre><code>&lt;div class="u lf " id="checkviewuser"&gt;
    &lt;span&gt;
      &lt;a id="numero2" href="/RIDOApp/login.xhtml"&gt;login&lt;/a&gt;&lt;b&gt; | &lt;/b&gt;
      &lt;a id="numero1" href="/RIDOApp/registraction.xhtml"&gt;register&lt;/a&gt;  
    &lt;/span&gt;
  &lt;/div&gt;
  
  &lt;div class="lf"&gt;
    &lt;h:outputText value="&amp;#160;&amp;#160;Welcome Back, #{userBean.firstName} &amp;#160;&amp;#160;" rendered="#{userBean.isLogin}" /&gt;
    &lt;p:commandLink value="logout" rendered="#{userBean.isLogin}" action="#{userBeanController.logout}" /&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
    if (('' + #{
        userBean.firstName
      } + 0) == 0) {
      $("#yhzx").hide();
      $("#checkviewuser").show();
  
    } else {
      $("#yhzx").show();
      $("#checkviewuser").hide();
    }
  &lt;/script&gt;
  </code></pre>