This is done in JavaScript, not python, I would wager.
Basic strategy:
- Start by adding (in the HTML) class="hideme" to the div's or p's or li's you want to affect.
- Then using something like the below hideClass(class) function (jQuery would be worth looking at too), select all parts of the page with class="hideme" and set their style to display: none to hide or display: block to show
.
function hideClass(name)
{
var matches = getElementsByClassName(name);
for (var i = 0; i < matches.length; i++)
{
var match = matches[i];
match.style.display = "none";
}
}
This calls getElementsByClassName.js available here:
http://code.google.com/p/getelementsbyclassname/
A function showClass(name) could be made similarly, with match.style.display = "block";