...

View Full Version : Show button



jojo_molat
04-22-2011, 09:11 PM
I need a show button when is clicked it disappears and on that place shows text , image or an video.Even button doesn't have to look as a button , it can be image or a text.I have found that on http://nba.lemons.se/ and on that site it shows result when button is clicked , I need something similar but can't find html code for that.If someone knows that , please post html code of that button.

Mooseman
04-25-2011, 12:48 AM
For something simple you can use this jQuery code:



<!--The jQuery Library-->
<script src="http://code.jquery.com/jquery-1.4.4.min.js" type="text/javascript">
</script>

<script type="text/javascript">
$(function(){
$("#Toggle1text").css("display","none");
$("#Toggle1button").click(function(){$('#toggle1text').toggle(1000);});
});
</script>

<style type="text/css">
#toggle1text{width: 200px;height: 100px;border: solid 1px black;background-color:transparent;text-align:center}
</style>

<button id="Toggle1button">Show/Hide</button><br />
<div id="toggle1text">
This is a simple show/hide with jQuery!</div>

If the user has JavaScript disabled, it will just show.


Hope this helps!
-Mooseman



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum