Skip to main content
Boss DJ
Known Participant
September 24, 2017
Answered

Having issues getting anchor transitions working

  • September 24, 2017
  • 1 reply
  • 819 views

Hi,

Like my title says, I'm having a bit of trouble getting my anchor transitions to work. I've done this before on other sites with no problems. In this instance, I set them up the same way and copied the script I used on these other cases but for some reason it's not working. As you can see on my page, the up and down arrows should take you smoothly to each section. Can anyone see what I'm missing here? Im stumped.

http://mustangdriveinguelph.ca/mv/test.html

Thanks ahead of time.

    This topic has been closed for replies.
    Correct answer osgood_

    https://forums.adobe.com/people/Boss+DJ  wrote

    I've made that change but it still doesn't seem to fix it unfortunately.

    That's because  Bootstrap is interfering with the function.

    Add a class of scroll-to to any anchor tags that you want to act as a scroll to trigger - so like below for your 2 anchor tags:

    <a href="#middle" class="scroll-to"><i class="fa fa-angle-down fa-2x"></i></a>

    <a href="#top" class="scroll-to"><i class="fa fa-angle-up fa-2x"></i></a>

    Then change the .click function:

    from:

    $('a[href*=#]:not([href=#])').click(function() {

    to:

    $('.scroll-to').click(function() {

    1 reply

    Legend
    September 24, 2017

    You have quite a few errors on that page (run it through the W3c validator to check) but the most likely cause of the issue is that you have your function inserted before the call to the jquery library.

    I would fix up the errors and move the function to AFTER the link to the jquery library and see if that works.

    Boss DJ
    Boss DJAuthor
    Known Participant
    September 24, 2017

    I've made that change but it still doesn't seem to fix it unfortunately.

    Nancy OShea
    Community Expert
    Community Expert
    September 24, 2017

    Is this what you're going for?

    Bootstrap Parallax Template  -- Click on top nav links to show the data-spy & smooth scrolling effects.

    View source to see the code.

    Nancy O'Shea— Product User & Community Expert