I am facing that is slider images on my site does not appear on the first attempt and I get the following error but when I refresh page sliders appears
Uncaught TypeError: $(...).swMegamenu is not a function
Uncaught TypeError: $(...).owlCarousel is not a function
collapsible.js:20 Uncaught TypeError: $.widget is not a function
Can anyone please help me with this
asked May 16, 2018 at 18:54
Sanya Zahid
1672 silver badges13 bronze badges
1 Answer 1
You should use always require js to call custom js
<script type="text/javascript">
require([
'jquery'
], function ($) {
Your Code ....
});
});
</script>
answered May 22, 2018 at 11:46
Hitesh Koshti
1,4454 gold badges18 silver badges38 bronze badges
-
I recommend adding all JS to JS files rather than inside templates with a
scripttag.Ben Crook– Ben Crook2018年05月22日 13:59:01 +00:00Commented May 22, 2018 at 13:59
default
swMegamenu?