Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-02-2004, 08:23 PM
WebProWorld Pro
 

Join Date: Jul 2003
Location: Naples, FL
Posts: 126
brianzajac RepRank 0
Default Javascript that sticks...

Hey forum readers/writers. I'm looking for a javascript that when clicked to the link, it stays in the "on" state. An example would be like http://www.sportbrain.com/Home/Home.cfm. Notice that when you click on a top nav button like "home", it stays on the "on" state. Also, the sub nav stays on the "on" state. So, you got any ideas?
__________________
Brian Zajac
EyeMagination
http://www.eyemagination.us - Naples Florida Web Design & Marketing
info@eyemagination.us
Reply With Quote
  #2 (permalink)  
Old 03-03-2004, 01:26 AM
WebProWorld Member
 

Join Date: Sep 2003
Location: Honolulu, Hawaii
Posts: 45
starrwriter RepRank 0
Default Re: Javascript that sticks...

Quote:
Originally Posted by brianzajac
Hey forum readers/writers. I'm looking for a javascript that when clicked to the link, it stays in the "on" state. An example would be like http://www.sportbrain.com/Home/Home.cfm. Notice that when you click on a top nav button like "home", it stays on the "on" state. Also, the sub nav stays on the "on" state. So, you got any ideas?
The home text link doesn't "stay" on because of javascript. It's coded in CSS with overline and underline for that home page. The other links don't stay on either (at least not in IE 5.5).

BTW, I love Naples and may move there soon.
Reply With Quote
  #3 (permalink)  
Old 03-03-2004, 04:46 AM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default

Hi Brian,

The effect you're after can be achieved by using CSS alone... if you're interested, here are a couple of posts that include links to relevant sources:

http://www.webproworld.com/viewtopic.php?p=63456#63456
http://www.projectseven.com/tutorial...menus/list_01/

http://www.webproworld.com/viewtopic.php?p=68549#68549
http://dreamlettes.net/tutorials/activelinks

If you'd prefer a JavaScript solution, then have a look at this page. The author uses a 'latched rollover' technique which works very well. So well in fact, that I used the same method on one of my sites www.eye4fitness.co.uk

So, you now have two or more options to consider!
Hope that helps,

Paul
Reply With Quote
  #4 (permalink)  
Old 03-04-2004, 04:24 PM
WebProWorld Pro
 

Join Date: Jul 2003
Location: Naples, FL
Posts: 126
brianzajac RepRank 0
Default

Thanks for the help. From what I see, this looks a bit too complicated than any type of plug n' play javascript code. If anyone finds out a system like that, let me know!
__________________
Brian Zajac
EyeMagination
http://www.eyemagination.us - Naples Florida Web Design & Marketing
info@eyemagination.us
Reply With Quote
  #5 (permalink)  
Old 03-04-2004, 10:04 PM
mikmik's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Edmonton, AB, Canada
Posts: 3,406
mikmik RepRank 1
Default

http://theimposter.org/examples/exploder2/iexplode.htm

Here is a very easy one that 'sticks' open, but I don't know if you want a verticle menu like this.
But to add a special class to a link is very simple.
For example, lets say that you want a button to stay 'active' for the page you are on.
Suppose your colors are "color: #CCCCCC; + background:#000000;" for the 'active', or 'hover' state, make an id that apllies to all the states (link, visited,[hover and active as well]) like this:

Quote:
/*current Link*/
#menu a#current,
#menu a#current:link,
#menu a#current:visited {
color: #CCCCCC;
background: #000000;
}
And then add the selector (id or class) to the native link, ie:
Here you are

It is really quite easy, if you show me the page, I will do this with you.
It is much easier than it looks!
:O)
__________________
What I am is what I am, are you what you are, or what.
Eddie Brickel
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: ,



Thread Tools
Display Modes

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

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


Search Engine Optimization by vBSEO 3.2.0