jscroll icon indicating copy to clipboard operation
jscroll copied to clipboard

jscroll is not a function

Open ilmam opened this issue 3 years ago • 1 comments

I am including jscroll as follows:

<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="https://unpkg.com/[email protected]/dist/jquery.jscroll.min.js"></script>
<script>
$(document).ready(function(){
    $('.scroll').jscroll({
                autoTrigger: true,
                loadingHtml: '<img class="center-block" src="/images/loading.gif" alt="Loading..." />',
                padding: 0,
                nextSelector: '.pagination li.active + li a',
                contentSelector: 'div.infinite-scroll',
                callback: function() {
                    $('ul.pagination').remove();
                }
            });
    });
</script>

yet I am getting the error:

jQuery.Deferred exception: $(...).jscroll is not a function TypeError: $(...).jscroll is not a function

it's driving me crazy! any idea what's going on here? I am using it inside a Laravel blade.

ilmam avatar Mar 08 '21 08:03 ilmam

Instead of doing ready try: jQuery(function ($) {

eqxDev avatar Mar 14 '21 17:03 eqxDev