djax icon indicating copy to clipboard operation
djax copied to clipboard

scroll to location links within djax page

Open o-l-e opened this issue 11 years ago • 4 comments

I am trying to use simple "click link to go to different location on the page" on one of my pages using djax, but it does not seem to work. Looks like there is some conflict.

To show what i want to achieve, here is the markup from one of my pages:

<div class="one-third column" id="middle">

        <a href="#s1">Section 1</a>
        <a href="#s2">Section 2</a>
        <a href="#s3">Section 3</a>

        <h1 id="s1">Header 1</h1>
        <p>Lorem Ipsum</p>

        <h1 id="s2">Header 2</h1>
        <p>Lorem Ipsum</p>

        <h1 id="s3">Header 3</h1>
        <p>Lorem Ipsum</p>

</div>

Is this even possible while using djax?

Thanks for any help, and nice script!

o-l-e avatar Jul 14 '13 08:07 o-l-e

@o-l-e I'm not certain of the current behavior but these should definitely be ignored by djax. I'll ensure so in the next update.

beezee avatar Mar 16 '14 19:03 beezee

hi, i have a messy test here http://sandbox.slettenostvold.com/djax/index.html What am i doing wrong?

Thanks

o-l-e avatar Mar 16 '14 22:03 o-l-e

Try name attribute instead of id.

<h1 name="s1">Section 1 header</h1

beezee avatar Mar 16 '14 23:03 beezee

sorry, just tried it and no luck.

o-l-e avatar Mar 16 '14 23:03 o-l-e