Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>Javascript:</strong> </p> <pre><code>function showForm(){ document.getElementById('loginForm').style.display = "block"; } function hideForm(){ document.getElementById('loginForm').style.display = "none"; } </code></pre> <p><strong>html:</strong></p> <pre><code>&lt;form&gt; &lt;p id="login" onmouseover="showForm();" onmouseout="hideForm();"&gt; &lt;span class="label"&gt;Login Here&lt;/span&gt; &lt;span id="loginForm"&gt; &lt;span class="form-elements"&gt; &lt;span class="form-label"&gt;Name:&lt;/span&gt; &lt;span class="form-field"&gt;&lt;input type="name" /&gt;&lt;/span&gt; &lt;/span&gt; &lt;span class="form-elements"&gt; &lt;span class="form-label"&gt;Password:&lt;/span&gt; &lt;span class="form-field"&gt;&lt;input type="password" /&gt;&lt;/span&gt; &lt;/span&gt; &lt;span class="form-elements"&gt; &lt;span class="submit-btn"&gt;&lt;input type="submit" value="Submit" /&gt;&lt;/span&gt; &lt;/span&gt; &lt;/span&gt; &lt;/p&gt; &lt;/form&gt; </code></pre> <p><strong>Demo:</strong></p> <p><a href="http://jsfiddle.net/rathoreahsan/aNWfV/" rel="nofollow">http://jsfiddle.net/rathoreahsan/aNWfV/</a> -- updated link</p> <p><strong>Jquery Solution:</strong></p> <pre><code>$("#login").hover(function() { $("#loginForm").css({"display":"block"}); }, function() { $("#loginForm").css({"display":"none"}); }); </code></pre> <p><strong>HTML:</strong></p> <pre><code>&lt;form&gt; &lt;p id="login"&gt; &lt;span class="label"&gt;Login Here&lt;/span&gt; &lt;span id="loginForm"&gt; &lt;span class="form-elements"&gt; &lt;span class="form-label"&gt;Name:&lt;/span&gt; &lt;span class="form-field"&gt;&lt;input type="name" /&gt;&lt;/span&gt; &lt;/span&gt; &lt;span class="form-elements"&gt; &lt;span class="form-label"&gt;Password:&lt;/span&gt; &lt;span class="form-field"&gt;&lt;input type="password" /&gt;&lt;/span&gt; &lt;/span&gt; &lt;span class="form-elements"&gt; &lt;span class="submit-btn"&gt;&lt;input type="submit" value="Submit" /&gt;&lt;/span&gt; &lt;/span&gt; &lt;/span&gt; &lt;/p&gt; &lt;/form&gt; </code></pre> <p>See Demo:</p> <p><a href="http://jsfiddle.net/rathoreahsan/SGUbC/" rel="nofollow">http://jsfiddle.net/rathoreahsan/SGUbC/</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload