How to use better-scroll script loading

better-scroll uses < script type= "text/javascript" src= " https://unpkg.com/better-scro.;>
to load into the page.
the official document says that a BScroll object will be mounted on the window after loading.
but it will still report an error Uncaught ReferenceError: BScroll is not defined

.

how exactly should that be used?

Nov.08,2021

better-scroll does not depend on other third-party plug-ins, so you can use it directly. You download the source code to the local file.


can be used. Ha, example


load before using

Menu