scroll - $(...).mCustomScollbar is not a function (JavaScript Modules and Dependencies) -
having trouble setting malihu-custom-scrollbar-plugin.
i installed follows:
jspm install mcustomscrollbar=npm:malihu-custom-scrollbar-plugin
i import relevant viewmodel follows:
import mcustomscrollbar 'mcustomscrollbar'; ... $('.article').mcustomscrollbar();
i following error:
$(...).mcustomscrollbar not function
looking @ dev-tools:network, library has loaded ??
you have 2 problems:
1) you've spelled mcustomscrollbar wrong (missing r in scroll)
2) need required css in template otherwise plugin fails load
(your css location may differ)
<link rel="stylesheet" href="../jspm_packages/npm/malihu-custom-scrollbar-plugin@3.0.9/jquery.mcustomscrollbar.css" /> <template> ... </template>
Comments
Post a Comment