show hide script problem

This is a discussion on "show hide script problem" within the JavaScript Forum section. This forum, and the thread "show hide script problem are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 24th, 2006, 11:02
New Member
Join Date: Nov 2006
Location: Nottingham
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Arrow show hide script problem

I have started to implement the unobtrusive show / hide script found at Exit 404
http://www.exit404.com/2005/57/unobt...culous-effects
However I need to start with all the areas closed rather than open. Any Ideas how this can be achieved whilst keeping it unobtrusive?
TIA
Anthony
Reply With Quote

  #2 (permalink)  
Old Nov 24th, 2006, 22:39
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: show hide script problem

I haven't read through all the code but he appears to be using the css display attribute with values of none and block to hide and show repsectively.

If you want to start with them all closed up, then make display: none; the default state for your boxes.
Reply With Quote
  #3 (permalink)  
Old Nov 25th, 2006, 00:54
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: show hide script problem

Here's a link to a script I made that should do what you want.

problem with a show/hide toggle thing (JS)
Reply With Quote
  #4 (permalink)  
Old Nov 27th, 2006, 09:34
New Member
Join Date: Nov 2006
Location: Nottingham
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: show hide script problem

Hi Peeps,

Thanks for the replys.
I should have made myself clearer, what I need the script to do is:
  1. be unobtrusive - No 'on click' events in the xhtml
  2. degrade - content still be viewable when scripting is off
  3. cookie - remember the last state the user was in
  4. blind up / down effect
  5. closed - start with all the elements closed
Thanks

Last edited by Scribble69; Nov 27th, 2006 at 09:45.
Reply With Quote
  #5 (permalink)  
Old Nov 27th, 2006, 16:07
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: show hide script problem

In your criteria:

1. How do you propose this happens then? Cursor rollover.
2. Then the default needs to be 'open' and you use script on load to close them.
3. Assumes user allows cookie. How important is this anyway?
4. Pardon???
5. See 2. above.
Reply With Quote
  #6 (permalink)  
Old Nov 27th, 2006, 18:40
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: show hide script problem

In reply to 2. No. Look at my script. It adds CSS via the JS file so if JS is off, the CSS to keep them hidden doesn't exist.
Reply With Quote
Reply

Tags
unobtrusive javascript

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Show Hide with JS abis123 JavaScript Forum 4 Dec 13th, 2007 05:39
[SOLVED] Show&Hide Div Box Maska JavaScript Forum 6 Oct 1st, 2007 11:04
Show/Hide JS pa007 JavaScript Forum 0 Apr 6th, 2007 19:18
problem with a show/hide toggle thing (JS) belledumonde JavaScript Forum 1 Sep 5th, 2006 20:24
Show/Hide Div Help Trebz JavaScript Forum 2 Feb 21st, 2006 22:37


All times are GMT. The time now is 19:02.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43