• ChickenWhisperer

    (@thispluginisbuggyashell)


    $(“#button”).click(function() {
    $([document.documentElement, document.body]).animate({
    scrollTop: $(“#elementtoScrollToID”).offset().top
    }, 2000);
    });

    That’s how simple the jQuery is.

    Now go read the 10 page tutorial on shortcodes and gutenberg to try and get this plugin to work. Better documentation is needed. An example like

    1. “Create div ID you want to scroll to”
    2. “Enter this code into a clickable element to scroll to that div ID”

    done.

Viewing 1 replies (of 1 total)
  • Plugin Author malihu

    (@malihu)

    The plugin provides a lot of features and more functionality than the code you posted. A lot more. Most of its features like offsetting sticky menus, scrolling from/to different pages and link highlighting are basically required by most sites.

    The plugin is also easier to setup for the average user than manually adding JS code.

    I also have a detailed tutorial on how to create the target divs and links here:

    https://manos.malihu.gr/page-scroll-to-id-for-wordpress-tutorial/

Viewing 1 replies (of 1 total)
  • The topic ‘There’s literally no way this is easier than the jQuery solution’ is closed to new replies.