Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to incorporate more/less links for multiple items

How to incorporate more/less links for multiple items

How to incorporate more/less links for multiple items

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';


<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">

<li><a href = "http://teams.----item1.aspx">Item 1</a></li>
<li><a href = "http://teams.----item2.aspx">Item 2</a></li>
<li><a href = "http://teams.----item3.aspx">Item 3</a></li>
<li><a href = "http://teams.----item4.aspx">Item 4</a></li>
<li><a href = "http://teams.----item5.aspx">Item5</a></li>

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

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!!!


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close