I need to use jQuery Steps plugin with Laravel. I have added jQuery and jQuery Steps via NPM this is my resources\js\app.js
import './bootstrap';
import jQuery from 'jquery';
window.$ = jQuery;
window.jQuery = jQuery
import 'jquery-steps/build/jquery.steps.min.js';
This is my view.
@vite(['resources/sass/app.scss', 'resources/js/app.js'])
<script type="module">
$("#example-basic").steps({
headerTag: "h3",
bodyTag: "section",
transitionEffect: "slideLeft",
autoFocus: true
});
</script>
But getting this error.
Uncaught ReferenceError: jQuery is not defined at app-0acac567.js:23:13949
jQuery("#example-basic")instead of$, in line with theimport jQueryline.import {jQuery} from 'jquery';window.$ = window.jQuery = jQuery;There's a lengthy thread here: stackoverflow.com/questions/41800122/…