####################### Just Copy And Past #######################
<div id="nav">
<a href="#content1">Show 1</a>
<a href="#content2">Show 2</a>
</div>
<div id="content1" class="toggle" style="display:none">Show 1</div>
<div id="content2" class="toggle" style="display:none">Show 2</div>
$("#nav a").click(function(e){
e.preventDefault();
$(".toggle").hide();
var toShow = $(this).attr('href');
$(toShow).show();
});
</script>
<div id="nav">
<a href="#content1">Show 1</a>
<a href="#content2">Show 2</a>
</div>
<div id="content1" class="toggle" style="display:none">Show 1</div>
<div id="content2" class="toggle" style="display:none">Show 2</div>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js'></script>
<script type="text/javascript">$("#nav a").click(function(e){
e.preventDefault();
$(".toggle").hide();
var toShow = $(this).attr('href');
$(toShow).show();
});
</script>
No comments:
Post a Comment