Javascript Expand/Collapse Element
Note: This piece of code wasn't entirely created by me. Also, I don't claim to be knowledgeable in javascript...I'm just sharing.
function expandCollapse() {
for (var i=0; i<expandCollapse. »
arguments.length; i++) {
var element = document.getElementById »
(expandCollapse.arguments[i]);
element.style.display = (element.style. »
display == "none") ? "block" : "none";
}
}
Which will allow you to expand and collapse a div in css. I needed this for a new addition to VisitMatewan.com that I'm working on. Handy....
No Comments »
RSS feed for comments on this post. TrackBack URL