• Resolved hellbertos

    (@hellbertos)


    This may seem odd, but is it possible to just enqueue the javascript-based Jquery plugin via the functions file and then write my own Jquery to control it? Without going too deep into it, I’m helping a friend out w/ a small scrolly site and want to show as few plugins as possible.

    I’ve tried downloading the minified version and enqueueing it via the functions file w/ Jquery as a dependency. Then I added a small file using this code from the site:

    <script>
        (function($){
            $(window).load(function(){
                $("a[rel='m_PageScroll2id']").mPageScroll2id();
            });
        })(jQuery);
    </script>

    I’ve tinkered around w/ it, but can seem to get it going. Am I way off base? Would love to use your AWESOME code in this fashion if possible. Thanks in advance for any guidance you offer.

    https://wordpress.org/plugins/page-scroll-to-id/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author malihu

    (@malihu)

    The code seems correct.
    Of course you can manually add the plugin by following this guide in plugin’s homepage:
    http://manos.malihu.gr/page-scroll-to-id/

    The way to add it should be the same as in non-wordpress sites (except from the js enqueue in functions.php.

    Have you done this and didn’t work? If yes, I’d need to see your site/template somehow in order to help.

    Thread Starter hellbertos

    (@hellbertos)

    Hey there Malihu! Thanks so much for getting right back. I followed the link you gave back to where I started and went back through it. Going back through, I figured it out. I wasn’t loading in the correct sequence. Duh.

    I’m really appreciate the rapid response to help me get going. Really looking forward to tinkering w/ your plugin on this little site. Thank again! And, great work!

    Thread Starter hellbertos

    (@hellbertos)

    Resolved!

    Plugin Author malihu

    (@malihu)

    Great, thanks 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Unusual Question: May I just enqueue the jquery plugin vs the WP Plugin’ is closed to new replies.