diff --git a/docs/docs/index.html b/docs/docs/index.html index f055751..4955a30 100644 --- a/docs/docs/index.html +++ b/docs/docs/index.html @@ -208,7 +208,22 @@
Install with yarn
yarn add swiffy-slider
+ Load Swiffy slider using webpack, ESBuild and other build tools.
+ NOTE: Swiffy slider is an ES Module and you need a supported processing ECMAScript compiler - i.e. webpack 5+ etc.
+
+// import Swiffy Slider JS
+import { swiffyslider } from 'swiffy-slider'
+window.swiffyslider = swiffyslider;
+
+window.addEventListener("load", () => {
+ window.swiffyslider.init();
+});
+// import Swiffy Slider CSS
+import "swiffy-slider/css"
+
oad Swiffy slider using webpack, ESBuild and other build tools. In your index.js (or whatever you call it).
+
Load Swiffy slider using webpack, ESBuild and other build tools. In your index.js (or whatever you call it).
NOTE: Swiffy slider is an ES Module and you need a supported processing ECMAScript compiler - i.e. webpack 5+ etc.
+// import Swiffy Slider JS
import { swiffyslider } from 'swiffy-slider'
window.swiffyslider = swiffyslider;
window.addEventListener("load", () => {
window.swiffyslider.init();
});
+
+// import Swiffy Slider CSS
+import "swiffy-slider/css"
+
+
+
+// import Swiffy Slider src CSS unminified
+import "swiffy-slider/src/swiffy-slider.css"
Avoid autobinding by adding data-noinit
attribute on the script tag and then attach the slider manually