Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

How to include JQuery on nested script

I have following code but for some reasons i am getting JQuery not defined error.

<script src="https://code.jquery.com/jquery-3.3.1.min.js"
        integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
        crossorigin="anonymous">
</script>
<script>
    $(function () { 
        if($("html").find('.mrp-fullscreen').length > 0){
            document.write('<script src="//mysite.com/wp-content/themes/mytheme/scripts/slick/slick.min.js"></sc' + 'ript>');
        }
    });
</script>

slick.min.js is using JQuery and getting error on that script that JQuery is not defined. Any idea what i am doing wrong here ?

Comments