0

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

1
  • Please share your code, where you have called that swMegamenu? Commented May 16, 2018 at 18:58

1 Answer 1

1

You should use always require js to call custom js

<script type="text/javascript">
require([
    'jquery'
], function ($) {
    Your Code ....
    });
});
</script>
1
  • I recommend adding all JS to JS files rather than inside templates with a script tag. Commented May 22, 2018 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.