Skip to content

Commit

Permalink
Firefox SetTimeOut delat workaround.\nExample for sorting indicator.
Browse files Browse the repository at this point in the history
  • Loading branch information
kelesi committed Oct 9, 2015
1 parent a862ec3 commit cc030d0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
23 changes: 11 additions & 12 deletions index.html
Expand Up @@ -48,7 +48,7 @@
}

.disabled {
opacity: 0.5;
opacity: 0.5;
}
</style>
</head>
Expand Down Expand Up @@ -125,17 +125,16 @@
});

//Sorting indicator example
var thnumber = '';
$('table.ex-2').on('tablesort:start', function(event, tablesort) {
$('table.ex-2 tbody').addClass("disabled");
thnumber = $('.ex-2 th.number').removeClass("sorted asc desc").text();
$('.ex-2 th.number').text('Sorting..');
});

$('table.ex-2').on('tablesort:complete', function(event, tablesort) {
$('table.ex-2 tbody').removeClass("disabled");
$('.ex-2 th.number').text(thnumber);
});
$('table.ex-2').on('tablesort:start', function(event, tablesort) {
$('table.ex-2 tbody').addClass("disabled");
thnumber = $('.ex-2 th.number').removeClass("sorted asc desc").text();
$('.ex-2 th.number').text('Sorting..');
});

$('table.ex-2').on('tablesort:complete', function(event, tablesort) {
$('table.ex-2 tbody').removeClass("disabled");
$('.ex-2 th.number').text('Number');
});


});
Expand Down
2 changes: 1 addition & 1 deletion jquery.tablesort.js
Expand Up @@ -87,7 +87,7 @@ $(function() {
self.$table.trigger('tablesort:complete', [self]);
//Try to force a browser redraw
self.$table.css("display");
}, 10);
}, unsortedValues.length > 2000 ? 200 : 10);
},

log: function(msg) {
Expand Down
2 changes: 1 addition & 1 deletion jquery.tablesort.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cc030d0

Please sign in to comment.