-function selectall(cls) {
- $('.' + cls).prop('checked', true);
- return false;
-}
-function selectnone(cls) {
- $('.' + cls).prop('checked', false);
- return false;
-}
+ // Get the parent table element.
+ var table = $(this).parents('table');
+ var orderUrl = this.getAttribute("data-order-url");
+ table.fadeTo("fast", 0.33);
+
+ $("body").css("cursor", "wait");
+
+ $.get(orderUrl, function(data) {
+ // Find the table element in the html we got.
+ var result = $(data).find('#' + table[0].id);
+ // And add the new table html to the parent.
+ $(table).parent().html(result);