The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Can this be done? Adding a class to a target link?

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #36306

    Is it possible to link from one .html page to an anchor on another page, and have javascript or something make that anchor highlighted?

    a link on page1.html…

  • This is the third part.
  • When I click the link above, I want it to go to the anchor link “#part3” and HIGHLIGHT THIS LINK, so that users will know which link they should click.

    the content on page2.html#part3…

  • Read more about part 3.
  • here’s the java i was using…

    Here’s my example…
    To the page with the #anchor target…
    To the page that is the target…


    So you have a link which says “Click this to be taken to another link”?

    I have to ask…why?


    Because its kinda like a library… The first page (page1.html) refrences the library (page2.html). And the library has links to external sources, or (in this case, catalogs). Since those catalogs will be changing often, I don’t want to have to change links all over our website.


    heres an example of what i’m trying to do…, except it would be on a much larger scale…
    The top link, “vegetable transplants”, needs to link to, and the list item that contains the #transplants anchor link should be hilighted.


    actually, i would rather have the entire catalog div highlighted, but im not sure this is possible.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.