[pmwiki-users] invisible/visible text

Pierre-Marie CARETTE carette.pierre-marie at wanadoo.fr
Fri Feb 10 14:36:20 CST 2006


Just an idea :

I see in the very useful-good pagetoc.php a script :
function toggle(obj) {
     var elstyle = document.getElementById(obj).style;
     var text    = document.getElementById(obj + "tog");
     if (elstyle.display == 'none') {
         elstyle.display = 'block';
         text.innerHTML = "hide";
     } else {
         elstyle.display = 'none';
         text.innerHTML = "show";
     }
}

ooooh I see also with the good useful postitnotes.pho

function switchhiddenjvscfct(n) {
  {
		detail=document.getElementById(n);
	}
	if (detail==null) return false;
	if (detail.style.display=="none") {
	   detail.style.display="inline";
	 } else {
	   detail.style.display="none";
	}
}


is it possible to generalize :
Utilisation: hide/show a long text

(:toggle:)
block text text
text
(:toggleend:)

but it's just a suggestion , I don't know php !  perhaps someone  
enjoys himself with building this open idea ! ;-) Thanks !! Enjoy





More information about the pmwiki-users mailing list