Open epeliberty opened 3 years ago
Hello,
I tried to use jquery.nicescroll with webpack 4.43 but i have this error :
jQuery.Deferred exception: $domElts.faqBox.niceScroll is not a function TypeError: $domElts.faqBox.niceScroll is not a function at HTMLDocument.<anonymous>
My code is :
import '../../../css/sites/customize/main.scss'; const Customize = () => { const $domElts = { faqBox: $('.faq-list .faq-list-questions-content') }; const initEvents = () => { if ($domElts.faqBox.length > 0) { $(() => { $domElts.faqBox.niceScroll({ cursorcolor: "#31b7bc", cursorwidth: "7px", zindex: -1, }); }) } }; return { init: () => { initEvents(); }, }; }; $(() =>{ Customize().init(); });
On my webpack.config.js, I have add this :
.autoProvidejQuery()
but it's doesn't work ...
Thank you in advance for your help
Hello,
I tried to use jquery.nicescroll with webpack 4.43 but i have this error :
My code is :
On my webpack.config.js, I have add this :
but it's doesn't work ...
Thank you in advance for your help