Hi I m using a php code to hide text/elements. Here it is onclick=\"document.all.a.style.display= document.all.a.style.display=='none' ? '' : 'none'\" PHP: id=\"a\" style=\"display: none;\" PHP: What happened with this code: It hide the elements and when i click once it visible the element and when i click again it hide the elements. ------------------------------------------------------- I m looking something more.... I use the code 3 or more in a page by changing id . So when i click id a Id a is visible when i click Id b, Id b is visible and i have to click again id a or b to hide the ID a and b I need to use bit modification like, (I have ID a, b, c, d, e) when i click id a, ID a will visible and if i click ID a again ID a will hide or If i click ID b/c/d/e whatever ID is , ID a will hide first (If ID a is not hide yet) and then and ID b will visible. same way for all ID use.... Could anyone make this way.... short code/syntax ? If possible could anyone make slow hide/visibility toggle elements with my existing code above display(i m using) with short code/syntax ? Plz i avoid jquery... Thanks for Advance
First of all the code here not even a bit relavant to php. those are all doing some thing with javascript, html and css. first you add a class to all the elements a,b,c,d,e and onclick event you call a function in that funtion you have to hide those class and show the id. if you want you can add the toggle() method.For that refer the link here and here
thanks for intention to help Oh i m sorry! i avoid jquery ... i like to use through javascript/css/php code
Sorry i think i cant understand you... here where comes php i dont know... and why you are avoiding jquery?
javascript also can do the same thing but loc will be much longer.jquery is same like javascript. the difference is it'll do more things than javascript in less code. these links may help ful to you http://www.dustindiaz.com/seven-togglers/, http://support.internetconnection.net/CODE_LIBRARY/Javascript_Show_Hide.shtml
Brother i have very little knowledge of script so i cant modify it... plz see this : http://dhtml-menu.com/tree-examples/tree-menuxp3.html I need only like this when i click 1 tree automatically other tree/toggle will hide... thats it, plz give a code with this onclick=\"document.all.a.style.display= document.all.a.style.display=='none' ? '' : 'none'\" PHP: id=\"a\" style=\"display: none;\" PHP: