How To Add jQuery Hide and Show Effect to Blogger

Adding jquery to a blog or website make it more dynamic. If you want to show some messages to visitors when a button is clicked then you can use this tips. Here when somebody clicks a button then message is shown and if again button is clicked then  message is hid. If you want to add hide and show effect to your blog, follow the steps below. You can see live demo here. You can add this effect anywhere in your blog. You can add this at your sidebar(see How to add Gadgets) or you can simply add it in your post or article.


<script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js" type="text/javascript"></script> 

<script type="text/javascript">   
$(document).ready(function(){   
$('#butShowHide').click(function() 
{   
$('#pShowHide').toggle(); 
});  
});   
</script>

<p id="pShowHide" style="display:none">Insert Your Content Here</p> 

<button id="butShowHide">Show/Hide</button>

I hope you like this jquery hide and show effect tricks. You can see a live demo here.
LIVE DEMO
You can also see How to put Jquery in Blog or Website.

No Comment Yet Post a Comment

Leave a Comment