February 28, 200818 yr Hey.. Im not that sure about javascript. but there is something i want to add to my site but there is no other way i can think of doing so without some complex CSS.... I want to have a button that you can click on and reveals a section of and at the same time pushes the section below down. Then when you click on the button below it that got moved down, the top section closes and this one opens and the same thing happens. I am not sure what this is called or how to do it, i was just wondering if anyone did??
February 28, 200818 yr Sounds like you want an accordion script. Try the method linked to, and explained, in this post. Rob
February 28, 200818 yr Author Yes that is what i want... but i was wondering how you implement the JS, i kno you put it in the Head, but what script you put around it.. such as <content type or whtever... soz if i confuse anyone cheers....
February 28, 200818 yr Author changed post while you where posting tht :S soz... read again.. pls see if you can help thanks
February 28, 200818 yr <script type="text/javascript"> Insert all the code here </script> That is the basic syntax for adding javascript code onto a page. You can find a better explanation at the w3schools page for the script tag.
February 28, 200818 yr Author That will do fine thanks, that's all i needed to know... sorry for messing up my post.
February 28, 200818 yr Author This is really annoying me... instead of one section being shown and the rest being hidden it is showing all the text that is in the sections so it is not really working... just displaying everything.... any idea of what i could be doing wrong, all help would be nice thanks..
February 28, 200818 yr If you give us a link to the page you have the script on, we'll be able to help you better
February 28, 200818 yr Author Given up on that code, sorry for the hassle. decided to use a code from DHTML, i found it easier to put on the page. Thanks anyway
Create an account or sign in to comment