Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to incorporate more/less links for multiple items

Status
Not open for further replies.

CJP12711

MIS
Jul 23, 2001
116
0
0
US
Hello! I'm new to Sharepoint and am having fun trying to figure out how to make certain things work in this environment. I currently have a list set up that looks like this:

Interventional Cardiology

When you click on that title, it opens up and displays more items under:

Interventional Cardiology
Item 1
Item 2
Item 3

This is the code I've used for this section:

<script type="text/javascript">
<!--
function switchMenu2(obj, link) {
var el = document.getElementById(obj);
if ( el.style.display != "none" ) {
el.style.display = 'none';
link.innerHTML = 'Interventional Cardiology';
}
else {
el.style.display = '';
link.innerHTML = 'Interventional Cardiology';
}
}

//-->
</script>
<body>

<div id="b1" class="more2">
<p class="Interventional Cardiology">
<a onclick="switchMenu2('myvar', this);" return false;">Interventional Cardiology</a></p>
<div id="myvar" style="display:none">
<div id="myvar" class="Interventional Cardiology">

<ul>
<li><a href = " 1</a></li>
<li><a href = " 2</a></li>
<li><a href = " 3</a></li>
<li><a href = " 4</a></li>
<li><a href = "</ul>
</div>
</div>


Once you click on the Interventional Cardiology section again, it will roll those items back up.

I'd like to expand this list to include more items, so the top level would look like this:

Interventional Cardiology
Cardiothoracic Surgery
Electrophysiology
.....

Clicking on each topic, would expand it to show the items under each one. Clicking again, would roll them back up.

And, as a bonus question, is there a way to make the mouse turn to a hand or something to let the users know it's a link? Right now, it just shows that I shape like with text.

Thanks for the help - it's much appreciated!!!

CJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top