splide-extension-auto-scroll
splide-extension-auto-scroll copied to clipboard
Returning error `n is not a function`
Checks
- [X] Not a duplicate.
- [X] Not a question, feature request, or anything other than a bug report directly related to Splide. Use Discussions for these topics: https://github.com/Splidejs/splide/discussions
Version
0.5.3
Description
Script returning error.

Below is the script that loads the splide.
$(".splide.media-scroller", context).once("splide-init").each(function () {
new Splide($(this).get(0), {
type: 'loop',
drag: 'free',
focus: 'center',
perPage: 3,
autoScroll: {
speed: 0.5,
},
gap: "1.5rem",
pagination: false,
arrows: false,
padding: "1.5rem",
mediaQuery: 'min',
fixedWidth: '65%',
breakpoints: {
576: {
fixedWidth: "41%",
},
992: {
fixedWidth: "30%",
},
1200: {
fixedWidth: "17%",
},
}
}).mount(window.splide.Extensions);
});
Reproduction Link
No response
Steps to Reproduce
- Create splide markup.
- Init the splide using the below code.
$(".splide.media-scroller", context).once("splide-init").each(function () {
new Splide($(this).get(0), {
type: 'loop',
drag: 'free',
focus: 'center',
perPage: 3,
autoScroll: {
speed: 0.5,
},
gap: "1.5rem",
pagination: false,
arrows: false,
padding: "1.5rem",
mediaQuery: 'min',
fixedWidth: '65%',
breakpoints: {
576: {
fixedWidth: "41%",
},
992: {
fixedWidth: "30%",
},
1200: {
fixedWidth: "17%",
},
}
}).mount(window.splide.Extensions);
});
- Open console log to see the error.
Expected Behaviour
There shouldnt be any javascript error.