Interesting Javascript Problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gamblingcentre.com

    Interesting Javascript Problem

    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!
    _______________ _______________ __

    Lucky Lottery Numbers,FREE E-book,
    Games,Sports Gambling Tips & Strategies.
  • Philip Ronan

    #2
    Re: Interesting Javascript Problem

    On 03.7.20 11:34 PM, Gamblingcentre. com wrote:
    [color=blue]
    > 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.[/color]

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

    Here's a link to get you started:


    Phil
    --
    Philip Ronan
    phil.ronanzzz@v irgin.net
    (Please remove the "z"s if replying by email)


    Comment

    • David Dorward

      #3
      Re: Interesting Javascript Problem

      Gamblingcentre. com wrote:
      [color=blue]
      > 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.[/color]

      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! */
      [color=blue]
      > However I also have links on the bottom of my page that I
      > would like to be white, rather then blue.[/color]


      [color=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?[/color]

      You could give each link a class and test for it in your script.
      [color=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?[/color]

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

      --
      David Dorward http://david.us-lot.org/

      Comment

      Working...