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

  • Please share your code, where you have called that swMegamenu? – kunj May 16 '18 at 18:58

You should use always require js to call custom js

<script type="text/javascript">
], function ($) {
    Your Code ....
|improve this answer|||||
  • I recommend adding all JS to JS files rather than inside templates with a script tag. – Ben Crook May 22 '18 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.