Mottie / tablesorter

Github fork of Christian Bach's tablesorter plugin + awesomeness ~
https://mottie.github.io/tablesorter/docs/
2.61k stars 754 forks source link

Uncaught TypeError: ts.debug is not a function #1615

Closed SeungKyoJin closed 5 years ago

SeungKyoJin commented 5 years ago
jquery.tablesorter.pager.js:949 Uncaught TypeError: ts.debug is not a function
at init (jquery.tablesorter.pager.js:949)
at HTMLTableElement.<anonymous> (jquery.tablesorter.pager.js:1182)
at Function.each (jquery-2.1.4.js:374)
at jQuery.fn.init.each (jquery-2.1.4.js:139)
at jQuery.fn.init.$this.construct [as tablesorterPager] (jquery.tablesorter.pager.js:1179)
at Object.success (players.php:147)
at fire (jquery-2.1.4.js:3099)
at Object.fireWith [as resolveWith] (jquery-2.1.4.js:3211)
at done (jquery-2.1.4.js:8264)
at XMLHttpRequest.<anonymous> (jquery-2.1.4.js:8605)

I have an error shown above. I cannot search why and when it occured.
variable pager for html is below.

var pager = '<div id="pager" class="tablesorterPager">' +
                    '<form><img src="/web1/ice_hockey/css/pager/icons/first.png" class="first">'+
                        '<img src="/web1/ice_hockey/css/pager/icons/prev.png" class="prev">'+
                        '<input type="text" class="pagedisplay">'+
                        '<img src="/web1/ice_hockey/css/pager/icons/next.png" class="next">'+
                        '<img src="/web1/ice_hockey/css/pager/icons/last.png" class="last">'+
                        '<select class="pagesize">'+
                            '<option selected="selected" value="10">10</option>'+
                            '<option value="20">20</option>'+
                            '<option value="30">30</option>'+
                            '<option value="40">40</option>'+
                        ' </select>'+
                        ' </form>'+
                    '</div>';

It is pagerOptions for the parameter.

    var pagerOptions = {
        container: $('#pager'),
        cssNext: '.next', // next page arrow
        cssPrev: '.prev', // previous page arrow
        cssFirst: '.first', // go to first page arrow
        cssLast: '.last', // go to last page arrow
        cssPageSize: '.pagesize'
    };

and jquery

$('#tb').tablesorter().tablesorterPager(pagerOptions);
Mottie commented 5 years ago

Hi @SeungKyoJin!

What version of tablesorter is being used? This fork of tablesorter includes a debug function, but the original does not.

SeungKyoJin commented 5 years ago

I find the answer! I get the same tablesorter versions from cdn, which were different.