Interesting Javascript Problem

G

Gamblingcentre.com

I have a sort of complicated problem that I would appreciate any help
I can get with. On my webpage I have a javascript running that
enhances all the links on my page. The script tells ALL the links to
remain blue. However I also have links on the bottom of my page that I
would like to be white, rather then blue. I was just wondering if
there is any possible way to:

1) Create the exact same javascript with the white colors and tell
just my bottom links to run that script, while the rest run on the
blue?

or

2) Is there is any code that I can insert on my webpage that can tell
only my bottom links to ignore the javascript, while the rest of the
page reads it?

Any help you can provide is greatly appreciated!
________________________________
www.gamblingcentre.com
Lucky Lottery Numbers,FREE E-book,
Games,Sports Gambling Tips & Strategies.
 
P

Philip Ronan

I have a sort of complicated problem that I would appreciate any help
I can get with. On my webpage I have a javascript running that
enhances all the links on my page. The script tells ALL the links to
remain blue. However I also have links on the bottom of my page that I
would like to be white, rather then blue.

Javascript isn't designed for this kind of thing. You need to use CSS.

Here's a link to get you started:
http://www.csscreator.com/css-forum/viewtopic.php?p=101

Phil
 
D

David Dorward

Gamblingcentre.com said:
I have a sort of complicated problem that I would appreciate any help
I can get with. On my webpage I have a javascript running that
enhances all the links on my page. The script tells ALL the links to
remain blue.

Why? That sounds like a very inefficient way to simulate this CSS:

a:link { color: blue; }
a:visited { color: blue; } /* Bad idea! Knowing which links are visible is
something users find useful! */
However I also have links on the bottom of my page that I
would like to be white, rather then blue.
http://www.allmyfaqs.com/faq.pl?Links_with_different_colors

I was just wondering if there is any possible way to:

1) Create the exact same javascript with the white colors and tell
just my bottom links to run that script, while the rest run on the
blue?

You could give each link a class and test for it in your script.
or

2) Is there is any code that I can insert on my webpage that can tell
only my bottom links to ignore the javascript, while the rest of the
page reads it?

No. Well, short of using frames (eugh) so that they are in a different
document.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,077
Messages
2,570,566
Members
47,202
Latest member
misc.

Latest Threads

Top