I'm new to jQuery and I want to create my own web page. So my problem is if my menu is using href to link each item to its specified content, like this..
<li><a href="#doc1">Doc1</a></li>
<li><a href="#doc2">Doc2</a></li>
<li><a href="#doc3">Doc3</a></li>
<script>
$(document).ready(function(() {
$(a).click(function() {
$(b).show();
});
});
</script>
What should I put in 'a' and 'b'? I've tried Googling this, but all the examples didn't show the complete script. I used to do it like this:
<li id="doc1menu">Doc1</li>
<script>
$(document).ready(function() {
$("#doc1menu").click(function() {
$("#doc1content").show();
});
});
</script>
But now I want a single function that could be used for all items on my menu, instead of doing one function for each item.