Creating filter for all pages for blog

Hi Everyone!

Thank you for spending the time out of your day to read my post.

I am trying to have the search I created filter through all the pages but

it will only filter on whatever current page the user is on.

Ex. If I filter a letter from Page 2, the results will only look for the filtered letter on page 2.

Here is the JS I used below.

$(".on-page-search").on(“keyup”, function() {
var v = $(this).val();
$(“a.demo-links”).each(function() {
if (v != “” && $(this).text().search(new RegExp(v, ‘gi’)) != -1) {
} else if (v != “” && $(this).text().search(v) != 1) {

Here is my site Read-Only: LINK
([how to share your site Read-Only link][2])