Skip to content

Instantly share code, notes, and snippets.

@scottlyttle
Last active December 14, 2015 10:49
Show Gist options
  • Save scottlyttle/5075092 to your computer and use it in GitHub Desktop.
Save scottlyttle/5075092 to your computer and use it in GitHub Desktop.

Revisions

  1. scottlyttle revised this gist Mar 3, 2013. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions next-prev-overide.js
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,12 @@
    // Store the links parent selectors as variables
    // store the links parent selectors as variables
    var $next = $(".next");
    var $prev = $(".prev");
    // If the prev posts link doesn't exist and the next link does
    // if the prev posts link doesn't exist but the next link does
    if ($prev.children().length == 0 && $next.children().length > 0) {
    // Add a span with prev
    // add a span with prev
    $prev.append('<span class="disabled">Prev</span>');
    // If the next posts link doesn't exist but the prev one does
    // if the next posts link doesn't exist but the prev one does
    } else if ($next.children().length == 0 && $prev.children().length > 0) {
    // Add a span with next
    // add a span with next
    $next.append('<span class="disabled">Next</span>');
    };
  2. scottlyttle created this gist Mar 3, 2013.
    12 changes: 12 additions & 0 deletions next-prev-overide.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    // Store the links parent selectors as variables
    var $next = $(".next");
    var $prev = $(".prev");
    // If the prev posts link doesn't exist and the next link does
    if ($prev.children().length == 0 && $next.children().length > 0) {
    // Add a span with prev
    $prev.append('<span class="disabled">Prev</span>');
    // If the next posts link doesn't exist but the prev one does
    } else if ($next.children().length == 0 && $prev.children().length > 0) {
    // Add a span with next
    $next.append('<span class="disabled">Next</span>');
    };