I am using Magento 2.2.6 and I am trying to include a jquery plugin (stickybits, in this case). The jquery plugin file is successfully called in my requirejs-config.js file and I can see that the file is correctly loaded in the head

When I try to call the particular plugin in my standard js file where I call many other jquery functions, I get the error:

Uncaught TypeError: $(...).stickybits is not a function

This does not even seem to be a jquery issue as I cannot even call the regular js version of that function and I get the error:

Uncaught ReferenceError: stickybits is not defined

I have tried clearing the caches but it did not help.

1 Answer 1


Every 3rd party plugin needs to be mapped in the requirejs-config.js file and "shim" to connect it to jquery; then the plugin needs to be called specifically under "require" in your regular js files

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.