Toggle DIV visibility based on Link click using jquery
I have a page that contains some alphabetical Information, for each
starting letter several paragraphs. on top of that page I want to have the
letters A-Z clickable, if I click on one of the letters only the div
containing the paragraphs with the letter should be showed.
example:
A B C D
<div id=A>
Amsterdam
Ankara
</div>
<div id=B>
Brussel
Budapest
</div>
<div id=C>
Calgary
Cairo
</div>
I have found some samples, but having a script function for every letter,
I just want one function identifying which letter was choosen, hides all
divs A-Z and Shows the div for the clicked letter.
Thanks for any hints!
No comments:
Post a Comment