Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jscroll is not a function #173

Open
ilmam opened this issue Mar 8, 2021 · 1 comment
Open

jscroll is not a function #173

ilmam opened this issue Mar 8, 2021 · 1 comment

Comments

@ilmam
Copy link

ilmam commented Mar 8, 2021

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.

@eqxDev
Copy link

eqxDev commented Mar 14, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants