/    Sign up×
Community /Pin to ProfileBookmark

How to make a link jump to the topic?
ex:

  • 1. Apple

  • 2. Ball
  • Apple
    Bla bla bla………

    Ball
    Bla bla bla……

    i meant when i click on Apple it will jump to the title Apple and when i click on Ball and it will jump to title Ball.
    Anyone could teach me please?

    to post a comment
    JavaScript

    10 Comments(s)

    Copy linkTweet thisAlerts:
    @JayDieMar 04.2004 — Insert at the title: <A name="ball">

    The, as link:

    <A href="#ball">Ball</A>

    JayDie
    Copy linkTweet thisAlerts:
    @PittimannMar 04.2004 — Hi!

    You can use anchors:
    [code=php]
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Untitled</title>
    </head>
    <body>
    <a href="#apple" title="&nbsp;jump to apple...&nbsp;">1. Apple</a><br>
    <a href="#ball" title="&nbsp;jump to ball...&nbsp;">2. Ball</a><br>
    <a name="apple">Apple</a><br>
    Bla bla bla.........
    <a name="ball">Ball</a><br>
    Bla bla bla......
    </body>
    </html>
    [/code]

    You will only see an effect, if your contents between the anchors is long enough...

    Cheers - Pit

    Edit: JayDie was faster :p!
    Copy linkTweet thisAlerts:
    @fredmvMar 04.2004 — JavaScript isn't required, and here's yet another example:&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;

    &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"&gt;
    &lt;head&gt;
    &lt;title&gt;untitled&lt;/title&gt;
    &lt;meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1" /&gt;
    &lt;style type="text/css"&gt;
    /*&lt;![CDATA[*/
    .spacer {
    height: 1000px;
    }
    /*]]&gt;*/
    &lt;/style&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;ol&gt;
    &lt;li&gt;&lt;a href="#apple"&gt;Apple&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#ball"&gt;Ball&lt;/a&gt;&lt;/li&gt;
    &lt;/ol&gt;
    &lt;div class="spacer"&gt;&lt;/div&gt;
    &lt;a id="apple"&gt;&lt;/a&gt;
    &lt;h1&gt;Apple&lt;/h1&gt;
    &lt;p&gt;foo&lt;/p&gt;
    &lt;div class="spacer"&gt;&lt;/div&gt;
    &lt;a id="ball"&gt;&lt;/a&gt;
    &lt;h1&gt;Ball&lt;/h1&gt;
    &lt;p&gt;bar&lt;/p&gt;
    &lt;div class="spacer"&gt;&lt;/div&gt;
    &lt;/body&gt;
    &lt;/html&gt;
    Copy linkTweet thisAlerts:
    @merxaisauthorMar 04.2004 — Thanks guys.... but how if i click on another page and link to this page and jump to the title? Thats mean i click on a link call DADDY and then go to a page call MOMMY, in MOMMY page got titles A and B, and what i want is when click on DADDY link and jump to MOMMY page with the title B! I hope i make myself clear.. hehe..
    Copy linkTweet thisAlerts:
    @JayDieMar 04.2004 — Also possible:

    Parents page: (parents.html)

    <A name="daddy">

    daddy blabla

    <A name="mommy">

    mommy blabla


    This page:

    <A href="parents.html#daddy">go to daddy on another page</A>

    <A href="parents.html#mommy">go to mommy on another page</A>


    JayDie
    Copy linkTweet thisAlerts:
    @PittimannMar 04.2004 — Hi!

    In DADDY.htm:

    <a href="MOMMY.htm#B">jump to mommy (?</a>

    in MOMMY.htm, you will need:

    <a name="B"></a>

    Cheers - Pit
    Copy linkTweet thisAlerts:
    @merxaisauthorMar 04.2004 — It doesnt work... it can link to MOMMY page but didnt jump to title B
    Copy linkTweet thisAlerts:
    @merxaisauthorMar 04.2004 — ahh.. sorry sorry.. it works perfectly... my bad.. forgot to save the page ??
    Copy linkTweet thisAlerts:
    @JayDieMar 04.2004 — Did you add the

    [CODE]
    <A name="B"></A>
    [/CODE]


    to your mommy.html?

    And... on the daddy.html

    [CODE]
    <A name="mommy.html#B">to Mommy - B</A>
    [/CODE]


    Think the name is case sensitive.

    Try to place the <A name="B"></A> on a new line...


    JayDie
    Copy linkTweet thisAlerts:
    @merxaisauthorMar 04.2004 — it works ^^ Thanks all!
    ×

    Success!

    Help @merxais spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.16,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...