bt707
asked on
Expand multiple links
I have a list of items on a web page that that is shown as a hyperlink, the example I have below shows one item, when I click on it the notes of that one will be shown, then clicking it again will hide the notes.
What I need to do is to add to this so that I have a list of items rather than just the one example I have, so need to have such as:
link one
link two
link three
link four
and so on
Can anyone show me how to add more items to my list to the example below.
What I need to do is to add to this so that I have a list of items rather than just the one example I have, so need to have such as:
link one
link two
link three
link four
and so on
Can anyone show me how to add more items to my list to the example below.
<html>
<head>
<title>Test Collapsible link</title>
<style>
div#expand {
display: none;
}
</style>
<script>
function show() {
if (document.getElementById('expand').style.display == 'block')
document.getElementById('expand').style.display = 'none';
else
document.getElementById('expand').style.display = 'block';
}
</script>
</head>
<body>
<a href="javascript:;" onclick=show()>Link one</a>
<div id="expand">
<p>THis is notes and description for link one</p>
</div>
</body>
</html>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER