Advanced Search

Results 1 to 6 of 6

Thread: Help with "Jump to"

  1. #1
    Join Date
    Apr 2006
    Location
    Arkansas
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with "Jump to"

    I saw the "Jump to top" script on the site. But, I was wondering if there was a "jump to" for a particular spot on the page itself? Rather than just the top. What I have is a newsletter, and I would like to put links at the top for things like "music" which, when clicked, would automatically jump to the music section. Etc. Can anyone help me with this?

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format for asking a question.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Apr 2006
    Location
    Arkansas
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The code I was referring to isn't the one I needed. >.< So, I don't need help with "that" one.

  4. #4
    Join Date
    Apr 2006
    Location
    Arkansas
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I figured this out. >.< Sorry for the bother. But, for anyone else that's wondering....

    For the links at the top of the page:

    <p>
    <a href="#music">Featured Music.</a>
    </p>

    Put this where you want that link to jump to on the page:

    <a name="music">*content*</a>

  5. #5
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by AnGeLiC
    For the links at the top of the page:

    HTML Code:
    <p>
      <a href="#music">Featured Music.</a>
    </p>
    What you're referring to here is a source anchor; one anchor in a pair that points from one location (the source) to another (the destination). That destination can either be found in the same document, or a different one. As you've discovered, a fragment identifier (#fragment-id) designates a particular location within a document.

    Put this where you want that link to jump to on the page:

    HTML Code:
    <a name="music">*content*</a>
    This is the destination anchor, and there are in fact two ways to specify one. An anchor (a) element with a name attribute acts as a destination anchor, where the value of that attribute would match against the fragment identifier. This, however, is an increasingly less common approach. In its place, one can add an id attribute directly to the destination element, which adds a lot more flexibility. For example, the above could be replaced with

    HTML Code:
    <p id="music">*content*</p>
    Mike


    To include markup, it's best to use [html&#93;...[/html&#93; rather than [quote&#93;...[/quote&#93;. The former retains formatting, which can greatly aid readability for large sections of code. There are similar tags for miscellaneous code like CSS or scripts ([code&#93;...[/code&#93 and PHP code ([php&#93;...[/php&#93.

  6. #6
    Join Date
    Apr 2007
    Location
    Kaohsiung, Taiwan
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks a lot for the info, this is exactly what I have been looking for! :]

    ian

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •