'$(...).pagination is not a function

I'm getting that error when it reaches this line. I've confirmed that the file jquery.simplePagination.js is present before it gets executed. I also don't see the function "pagination" listed under $.fn.(...). After the page loads(and the call fails) the pagination function IS present in that list, but not during the script execution. I'm at a loss. jquery is present, the file is present. So why aren't the functions available? For what it's worth this works in an isolated environment but not when I deploy it to my Sharepoint website.

        $("#quickTables").pagination({
        itemsOnPage: perPage,
        cssStyle: "light-theme",
        onPageClick: function(pageNumber){
            $.each( pageArr, function(key, value) {
                var pageDiv = "paginationPageNumber" + pageNumber;
                if (value == pageDiv )
                    $("#" + pageDiv).show();
                else
                    $("#" + pageDiv).hide();
            });
        }


Solution 1:[1]

Check the following steps.

1) Check if the pagination jquery is loaded.

If this pagination jquery is loaded then

2) check if there is only one jquery is loaded on the page.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tausif Anwar