title: onclick event with div tag
body: <p>I tried something with div tag as follows,</p>
  
  <pre><code>  &lt;style type="text/css"&gt;
      #hello{
          visibility: visible;
          cursor: pointer;
          position: absolute;
      }
      #list{
          visibility: hidden;
          cursor: pointer;
          position: absolute;
          top: 30px;
          z-index:  1;
          background-color: aqua;
      }
      #second{
              position: absolute;
      }
  &lt;/style&gt;
  &lt;div id="hello" onclick="{if(list.style.visibility=='hidden'){list.style.visibility='visible';}else{list.style.visibility='hidden'};}"&gt;Hello user&lt;/div&gt;&lt;br/&gt;
        &lt;div id="second"&gt;Welcome to smartdata&lt;/div&gt;
        &lt;div id="list"&gt;
            &lt;a href="index.jsp"&gt;Home&lt;/a&gt; &lt;br/&gt;
            &lt;a href="#" onclick="{alert('You are going to signout');}"&gt;SignOut&lt;/a&gt; &lt;br/&gt;
        &lt;/div&gt;
  </code></pre>
  
  <p>It is working fine but the problem is list is not displaying on the first click. Any thing wrong with my code.??</p>