Jonesy44 commented on a Page, JavaScript Paragraph Toggle  -  Oct 05, 2008

It is possible, what i'd do (bearing in mind that i am not very good at javascript) is while loop to close them all then open a single one. for example

function collapse(open) {
  for (x=1;x<=[NUMBER_OF_PARAGRAPHS];x++) {
    document.getElementById("objectname" + x).style.display = "none";
  }
  document.getElementById("objectname" + open).style.display = "inline";
}

Hope that helps!

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.