This topic contains 15 replies, has 2 voices, and was last updated by  Kharis Sulistiyono 3 years, 8 months ago.

href to a bookmark in another page

  • This, of course, doesn’t work… it only works IF the top page is Publication. If the top page is any other page (Research, About Me, Gallery, etc), clicking on the href screws up the layout. The js must first bring up the Publications page…

    Hello there,

    Thank you for reporting.

    Could you please try to use the custom.js file?

    Your link format should be

    < a class="inline-nav" href="#teaching" data-scroll-to="#paper10">Teaching< / a>

    From the example above, the target part is

    <h4 class="pubtitle" id="paper10">Title of the paper</h4>

    Let me know how it works for you.


    You must be logged in to view attached files.

    Hi Kharis,

    Thank you very much! it *almost* works, but here’s the issue: it only works the first time! let’s say you go back to the previous page and click on the link again, and then it stops working. I know the issue: “goscroll.offset().top” gives the relative offset with respect to the current position, but we are scrolling from the top of the position. If the target page is not at top, it fails to scroll properly.


    OK, the fix was easy :) I replaced your line: “gotop2.animate({scrollTop: goscroll.offset().top}, 500);” with “gotop2.animate({scrollTop: gotop2.scrollTop() + goscroll.offset().top}, 500);”. Now it works flawlessly.

    I’m all set! thank you for your quick replies. Where can I give you a good review? :)

    ps> by the way, here is the final result:

    Dear Mehrtash,

    I’m glad that your objectives have been achieved already. I’m happy to have an opportunity to assist you.

    Where can I give you a good review? :)

    You can go to your download page, then rate our products. We would highly appreciate it if you do so.

    Please let us know if you have any further questions, or if we can provide you with any other assistance.


The topic ‘href to a bookmark in another page’ is closed to new replies.