This is a discussion on "[SOLVED] Show&Hide Div Box" within the JavaScript Forum section. This forum, and the thread "[SOLVED] Show&Hide Div Box are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] Show&Hide Div Box
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Hello,
I have a show&hide div box js. and i want to invert the function on it. I mean, when i open the page when the script are instaled, the script is set to show the div box, and have the option to Close the div box; I want to invert the function like when i open the page, to not show the div box , just the "OPEN" option to open the div box and close then if the users want. Here is my JS. file:
Last edited by Maska; Sep 29th, 2007 at 15:12. |
|
|
|
||||
|
Re: Show&Hide Div Box
Okay you could have a function that toggles the area, this one will completely remove the space from where the div was.
Cheers
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
||||
|
Re: Show&Hide Div Box
I tried doing a code like this previously,
but mine was pretty bad. May use this thanks
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|||
|
Very nice answer, very useful and very funny too!
Works perfectly! Thanks again Rakuli; like usually, you solve my problem successfully and professionally too... I am verry happy becouse i find this professional forum with so kind members too, so i put a link on my site, like my gratefully, on www.jocurigratuit.ro (it is a games site). I don`t know how much it will help but this forum must have more visitors becose it deserve If the admin have a small banner 88x31 px. i will add also. Thanks again Rakuli! Last edited by Maska; Oct 1st, 2007 at 11:06. |
|
|||
|
It is posible to use two java scripts like this one, on the same page, in the differend locations without confuse the elements script?
I try to use this js. two times in the same page in differend locations and the functions works conflicting, simultaneous. Thanks anyone give me the right solution! |
|
||||
|
Re: Show&Hide Div Box
This should work without any issue at all.
You just need to specify the name of the div you want to toggle and use the 'this' keyword to pass the reference to the link. ie. <a href="javascript:void()" onclick="toggle('div1', this)">Toggle Div1</a> <a href="javascript:void()" onclick="toggle('div2', this)">Toggle Div 2</a> etc..
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: Show&Hide Div Box
My best friend forever!
I feel must pay you for every answer i get from you, insomuch that i like your fast answer! Thank you again Rakuli! Last edited by Maska; Oct 1st, 2007 at 15:30. |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Show/Hide Div + change image=HELP | Webill | JavaScript Forum | 3 | May 11th, 2008 15:08 |
| CSS Show Hide with JS | abis123 | JavaScript Forum | 4 | Dec 13th, 2007 05:39 |
| Show/Hide JS | pa007 | JavaScript Forum | 0 | Apr 6th, 2007 19:18 |
| Show and Hide Text - how do I do that? | Love2Java | JavaScript Forum | 1 | Mar 29th, 2007 00:23 |
| Show/Hide Div Help | Trebz | JavaScript Forum | 2 | Feb 21st, 2006 22:37 |