NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page YUI javascript show/hide code

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search


Reply
 
LinkBack Thread Tools
Old 08-27-2008, 08:08 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
DylanButler's Avatar
Join Date: Jan 2006
Location: San Diego, CA
Posts: 735
DylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to behold
 



YUI javascript show/hide code


I've created some code to easily create multiple show/hide menus using YUI.

If you are looking for an "all CSS" solution, you won't find that here (and you won't find any as capable as this solution anywhere).

http://www.dylanbutler.com/2008/08/y...showhide-code/

The beauty of this code is this:

a) It uses YUI
b) It supports any type of content inside the menu (no more sifting through nodes).
c) It works for trigger/menu ID pairs OR a nested HTML list (UL, OL, DL).
Last edited by DylanButler; 12-01-2008 at 10:28 PM.
DylanButler is offline   Reply With Quote
Old 08-27-2008, 11:16 PM   #2 (permalink)
Senior Member
 
nasaboy007's Avatar
Join Date: Jul 2005
Location: NJ
Posts: 1,219
nasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud of
 



by YUI, are you referring to the yahoo user interface? i'm not familiar with that acronym and that was the first google result XD.
nasaboy007 is offline   Reply With Quote
Old 08-28-2008, 06:49 AM   #3 (permalink)
Senior Member
 
Eric's Avatar
Join Date: Mar 2005
Posts: 4,948
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
Originally Posted by nasaboy007
by YUI, are you referring to the yahoo user interface? i'm not familiar with that acronym and that was the first google result XD.
Yes http://developer.yahoo.com/yui/
????: NamePros.com http://www.namepros.com/code/508248-yui-javascript-show-hide-code.html

It's a great library. Even vBulletin uses it now.
Eric is offline   Reply With Quote
Old 11-25-2008, 11:06 PM   #4 (permalink)
NamePros Member
Join Date: May 2008
Location: Future
Posts: 50
DecepShaun is on a distinguished road
 



Yeah, definitely, YUI is pretty solid.. I haven't used the JS stuff much, mainly the CSS stuff (grid, reset, etc.). It's fine and dandy indeed.
__________________
idle.
DecepShaun is offline   Reply With Quote
Old 11-29-2008, 01:01 AM   #5 (permalink)
NamePros Regular
 
Colleen's Avatar
Join Date: Mar 2004
Location: Canada
Posts: 256
Colleen is a jewel in the roughColleen is a jewel in the roughColleen is a jewel in the rough
 



Just incase anyone else wants to view this, the url has changed since the original post, it's now, http://www.dylanbutler.com/2008/08/y...showhide-code/

Very nice work, Dylan, I especially LOVE Example 2!
Colleen is offline   Reply With Quote
Old 12-01-2008, 10:35 PM THREAD STARTER               #6 (permalink)
NamePros Regular
 
DylanButler's Avatar
Join Date: Jan 2006
Location: San Diego, CA
Posts: 735
DylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to beholdDylanButler is a splendid one to behold
 



Hey Colleen -

Thanks for keeping this updated. You can see the live example of example 2 at caliperls dot com.

We have been using this code for most menus and show/hide scenarios at my job. The code has held up pretty well, but needed modifications on several occasions (sorry!). I'll post up the latest version as soon as it's solid.
DylanButler is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 02:53 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger