<commit_before>// Handle tables that are sortable with javascript alone
$j('table.sortable').livequery(function() {
  $j(this).tablesorter({ textExtraction: 'complex' });
});

// Handle tables that require an ajax request to fetch the newly sorted table data
$j('.sort_link').livequery(function() {
  $j(this).click(function(evt) {
    // don't want the default click action to fire
    evt.preventDefault();

    // locate the target element (where the newly loaded data goes)
    var target = $j(evt.target).parents('#' + $j(evt.target).attr('data-replace'));
    target.html('').siblings('#loader').show();

    // load the new data and insert it in the target
    $j.get($j(evt.target).attr('href'), null, function(data, status, xhr) {
      target.html(data).siblings('#loader').hide();
    });
  });
});<commit_msg>Added some jQuery ajax loading code for pagination links on sortable tables<commit_after>// Handle tables that are sortable with javascript alone
$j('table.sortable').livequery(function() {
  $j(this).tablesorter({ textExtraction: 'complex' });
});

// Handle tables that require an ajax request to fetch the newly sorted table data
$j('.sort_link').livequery(function() {
  $j(this).click(function(evt) {
    // don't want the default click action to fire
    evt.preventDefault();

    // locate the target element (where the newly loaded data goes)
    var target = $j(evt.target).parents('#' + $j(evt.target).attr('data-replace'));
    target.html('').siblings('#loader').show();

    // load the new data and insert it in the target
    $j.get($j(evt.target).attr('href'), null, function(data, status, xhr) {
      target.html(data).siblings('#loader').hide();
    });
  });
});

// Handle pagination links with the 'ajaxy' class
$j('.pagination.ajaxy > a').livequery(function() {
  $j(this).click(function(evt) {
    evt.preventDefault();

    // locate the target element (where the newly loaded data goes)
    var target = $j(evt.target).parents('#' + $j(evt.target).parent().attr('data-replace'));
    target.html('').siblings('#loader').show();

    // load the new data and insert it in the target
    $j.get($j(evt.target).attr('href'), null, function(data, status, xhr) {
      target.html(data).siblings('#loader').hide();
    });
  });
});
{'fraction_non_alphanumeric': 0.17802197802197803, 'fraction_numerical': 0.0, 'mean_word_length': 4.002197802197802, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1543592', 'n_tokens_mistral': 692, 'n_tokens_neox': 692, 'n_words': 191}