I'm using the Porto Theme (of course - Porto is making trouble), and I randomly get console errors for both $(...).owlCarousel is not a function
and $(...).stellar is not a function
.
under design/porto_child I created requirejs-config.js which looks like this
var config = {
paths: {
'js/jquery.stellar.min':'js/jquery.stellar.min',
'owl.carousel/owl.carousel.min': 'Smartwave_Porto/js/owl.carousel.min'
},
shim: {
'js/jquery.stellar.min': {
deps: ['jquery']
},
'owl.carousel/owl.carousel.min': {
deps: ['jquery']
},
},
mixins: {
'mage/collapsible': {
'js/collapsible-mixin': true
}
}
};
This didn't change anything.
This is what's calling the Stellar function
require([
'jquery',
'js/jquery.stellar.min'
], function ($) {
$(document).ready(function(){
$(window).stellar({
responsive: true,
scrollProperty: 'scroll',
parallaxElements: false,
horizontalScrolling: false,
horizontalOffset: 0,
verticalOffset: 0
});
});
});
Any idea what else I can do?
Thank you