FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

expandable panel like this

 


Mgccl
have not expand the panel


expand the panel


and one can make things like that? because it's really kinda hard for me to make it.....
LukeakaDanish
if all you need is to change the way your page looks, some very simple javascript and css can do the job.

Put the entire panel inside a div with the following css attribute:

Code:
<div style="visibility: hidden;" id="panel"><!--panel stuff goes here--></div>


Then set the following as the "href" of your "expand" button:

Code:
<a href="javascript:togglePanel();"><!--this is your button--></a>


inside you head section, include the following script:

Code:
<script languiage="javascript" type="text/javascript">
<!--

isVis = false;

function togglePanel() {
   if (!isVis) {
      document.getElementById('panel').style.visibility = "visible";
      isVis = true;
   }
   else {
      document.getElementById('panel').style.visibility = "hidden";
      isVis = false;
   }
}
-->
</script>


Of course, it will probalby not be so easy in reality, however i cant really do it for you unless i can see your page...
Mgccl
well, you know this is just ordnary PHPfreechat
www.phpfreechat.net
if you can do it... you will save everyone in that community!
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.