Smooth Scrolling add on not working in Chrome
  • http://serifaddons.com/smooth-scrolling-demo.html

    The smooth scrolling add on is not working for in my website or on the serif add on page above when I view in chrome, I tried Explorer and edge and it still works there.
  • Thanks for the pointer, I think it maybe down to something Google did with their browser on one of their updates and will probably need Neil to fix with a jQuery update.
  • Thanks Neil, I think that should sort Keith out with any Chrome scrolling issues ;-)
  • Nope sorry that didn't work. I can see you have fixed your smooth scrolling issue on your demo page.
    The problem is my code fragment doesn't have ANY files associated with it.
    I've even tried dragging a new scrollbar/asset and that doesn't have any files associated with it. Or they are not visible (I can see the jquery.scrollto.js in the site manager's file tab.) There is no option to delete the jquery.scrollto.js file via the site manager, but it does tell me its "HTML code resource for HTML Fragment frag_2"

    Webplus X7
    smooth scrolling pack v2.0
  • Hi Keith,

    If you can see the scroll.js file via the webplus file manager, then the asset file MUST have the file added to the frag or you just would not see it. When you double click the frag, look for the files tab, I'm not at my work station right now to check WPX7 but they have to be there.
  • It's not in the section at the bottom of the window? Are you sure you're not using X8?

    WebPlus X7:

    image

    In X8 you need to click the Files tab.

    WebPlus X8:

    image

  • i wish i could do a screen dump to show you
  • i just purchased and downloaded a new bundle pack
    the smoothscroll didn't work for chrome and there are no files associated with the asset/fragment
  • Yipee ive found the 3 files associated with the fragment. just need to update the broken one now.......
  • Ok I managed to get the template smoothscrolling for explorer. with the new pack i downloded.

    Is there any chance YOU could just fix the smoothscrolling asset pack so i dont keep having to repair it myself? I'd like to download a working version of the smoothscrolling add on.

    I don't know which emoji to pick to express how frustrated I am right now.
  • Keith,

    You do not need to keep repairing it over and over, simply repair it once so that the frag has the latest updated files and then drag the frag box back into the asset tab on the left of the work window, you can then save this new frag as a new asset and name it accordingly (Fixed SmoothScrolling - or similar) when you next want to use it on another project, the scrolling will work in Chrome as well as all the other browsers and will not need another fix.
  • ok i managed to update the jquery.scrollTo.js .
    I even downloaded it directly from its source. It moves to the correct place but it doesnt scroll. Ive tried altering the duration in the jquery file but I don't know what I'm doing really it still just jumps to the place. I see your demo works, so why can't I get mine to work?
    Please fix the asset/plugin and let me download it again


  • $(document).ready(function(){
    // Add smooth scrolling to all links
    $("a").on('click', function(event) {

    // Make sure this.hash has a value before overriding default behavior
    if (this.hash !== "") {
    // Prevent default anchor click behavior
    event.preventDefault();

    // Store hash
    var hash = this.hash;

    // Using jQuery's animate() method to add smooth page scroll
    // The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
    $('html, body').animate({
    scrollTop: $(hash).offset().top
    }, 800, function(){

    // Add hash (#) to URL when done scrolling (default click behavior)
    window.location.hash = hash;
    });
    } // End if
    });
    });


    body, html, .main {
    height: 100%;
    }

    section {
    min-height: 100%;
    }
  • paste to head
  • Keith, I just don't understand what you are doing, where has all the code come from in your post above? What are you pasting to the head & why?

    If you start changing code and don't really know what you are doing, then you are surely going to break things and cant expect them to work.
  • I'm going to take a shot and guess that you're not following the very first instruction in the help file:

    Important! Before you start
    Before you do anything it’s important to make sure you follow these simple steps or the addon
    will not work. Click on Properties > Site Properties > HTML Format > Tick the checkbox for ‘Write
    the ID for each object’.

    Neil
  • I just tried the working jerky navbar add-on without ticking the tickbox for ‘Write
    the ID for each object’. I previewed in chrome and the links didn't take me to the anchor fragments.

    If i do the same but tick ‘Write the ID for each object’. then the page moves instantaneously to each anchor fragment, It moves but doesn't smoothscroll.

    So yes I ticked the box

    Your demo page smoothscrolls and so does Ariels demo page.

    http://demos.flesler.com/jquery/scrollTo/old/

    http://iafloor.com

    http://iafloor.com/test/


  • Thanks for letting me know.

    I think the issue here might be that you've got this line of code which isn't needed:

    <script type="text/javascript" src="jquery.js"></script>

    You'll find it by double clicking the HTML Code Fragment for the smooth scroller. Try deleting it and letting us know how that goes.

    Neil
  • http://iafloor.com/test/

    Nope that didn't work.

    I noticed you had
    script type="text/javascript" src="jquery-v2.js"
    on your smoothscroll demo page.
    If i download the bundle pack again will the smoothscroll addon be updated with the new jquery-v2 ?

  • The v2 file is the same as its default and just simply renamed to not conflict with things on the server when Neil was updating other things. This would not be the reason why you are still having issues at your end with the add-on. As a test, create a blank new site and single page, add the smooth scroll add-on, update the scrollto js file then take out the code call to jquery.js inside the html frag and then put a tick in the box to include jquery, then test in your browsers, if it then works, it proves the issue is somewhere within the code of the site itself and not the add-on after updating it.

    Hope this helps
  • http://iafloor.com/test/
    put a tick in the box to include jquery? THATS IT.

  • Sorted ;-)
  • ok.

    so the smoothscroll works, until i try and also have a slider on that page then the slider wont work, and the smoothscroll goes jerky.(no scroll)

  • Then you have jQuery conflicts somewhere but it proves the updated add-on works and the issue is site code, I can't do anything from here because I'm not at my own work station and away till mid day tomorrow but Neil maybe able to help more in the morning.
  • thanks, give me a plank of wood to nail down and I'll be happy. This code is doing my head in.
  • One thing you could try after looking at your 2 page demo, one works without the slider and the other with the slider doesn't smooth scroll, therefore, on the page with the slider, double click the frag holding the code and replace these 2 lines of code

    $.noConflict();
    jQuery(document).ready(function($) {


    With this single line of code

    $(document).ready(function() {

    Hopefully then, the smooth scroll will work along side the slider without issues

    Hope this helps a little more
  • Woah....That worked.

    Thanks.

    I've updated my test page and it works....just need to implement it on my actual website

    Thanks again.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion