Some useful CSS and Javascript tips
Use the following Css code for hide anchor link.
Using onmouseover and onmouseout, We can hide and show div content.Find the below code for example or click live demo button.
Please share your comments and feedback.Thanks.Please subscribe my updates via email.
Use the following Css code for hide anchor link.
Hide tag link using CSS
<a href="http://www.google.com" class="first">Google</a>
<style>.first{ pointer-events:none;}</style>
<style>.first{ pointer-events:none;}</style>
Show hide div using Javascript
<a onmouseover="document.getElementById('div_name').style.display='block';" onmouseout="document.getElementById('div_name').style.display='none';"
href="" onclick="return false;">
Show</a>
<br />
<div id="div_name" style="display:none;margin:15px 15px 0px 15px;padding:5px;border:1px solid #aaa;">
This is more information placed in our hidden div.
When you move your mouse off the link above this DIV area will
disappear.
</div>
href="" onclick="return false;">
Show</a>
<br />
<div id="div_name" style="display:none;margin:15px 15px 0px 15px;padding:5px;border:1px solid #aaa;">
This is more information placed in our hidden div.
When you move your mouse off the link above this DIV area will
disappear.
</div>
Show hide div using CSS
<style type="text/css">
.popup {position: fixed;visibility: hidden;border:1px solid #000; padding:5px;}
a:hover + .popup {visibility: visible;}
</style>
<a href="#">Show Popup</a>
<p class="popup">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
.popup {position: fixed;visibility: hidden;border:1px solid #000; padding:5px;}
a:hover + .popup {visibility: visible;}
</style>
<a href="#">Show Popup</a>
<p class="popup">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
No comments:
Post a Comment