title: jQuery search only searching the page its on
body: <p>I have laravel data which is paginated using laravels default paginator like so.</p>
  
  <p>Controller</p>
  
  <pre class="lang-php prettyprint-override"><code>$applications = Application::onlyTrashed()-&gt;latest()-&gt;paginate(25);
  return view('index', compact('applications'));
  </code></pre>
  
  <p>The table is my blade template is like this</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;label for="kwd_search"&gt;Search:&lt;/label&gt; &lt;input type="text" id="kwd_search" value=""/&gt;
  &lt;table class="table table-striped table-bordered table-hover" id="my-table1"&gt;
      &lt;thead&gt;
          &lt;tr class="header"&gt;
              &lt;th&gt;{{ trans('crud.users.id') }}&lt;/th&gt;
              &lt;th&gt;{{ trans('Name') }}&lt;/th&gt;
              &lt;th&gt;{{ trans('Email') }}&lt;/th&gt;
              &lt;th&gt;{{ trans('Country') }}&lt;/th&gt;
              &lt;th&gt;{{ trans('Contact No') }}&lt;/th&gt;
              &lt;th&gt;{{ trans('counsellor') }}&lt;/th&gt;
              &lt;th&gt;{{ trans('Submitted On') }}&lt;/th&gt;
              &lt;th&gt;{{ trans('Status') }}&lt;/th&gt;
              &lt;th&gt;{{ trans('crud.actions') }}&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          @foreach ($archivedApplications as $row)
          &lt;tr&gt;
              &lt;td&gt;{!! $row-&gt;id !!}&lt;/td&gt;
              &lt;td&gt;{!! $row-&gt;name ?: 'No Name Provided'!!}&lt;/td&gt;
              &lt;td&gt;{!! $row-&gt;email !!}&lt;/td&gt;
              &lt;td&gt;{!! $row-&gt;country['name'] ?: 'No Country Provided' !!}&lt;/td&gt;
              &lt;td&gt;{!! $row-&gt;contact_no ?: 'No Number Provided' !!}&lt;/td&gt;
              &lt;td&gt;{!! ((isset($row-&gt;counsellor-&gt;name))?$row-&gt;counsellor-&gt;name:'') !!}&lt;/td&gt;
              &lt;td&gt;{!! $row-&gt;created_at !!}&lt;/td&gt;
  
              &lt;!-- additional td --&gt;
              &lt;td&gt;
                  &lt;span class="blockify-button btn-warning"&gt;{!! trans('Archived') !!}&lt;/span&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          @endforeach
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>The below is my JS for searching. It currently only searches the current page, not just the one I'm on.</p>
  
  <pre class="lang-js prettyprint-override"><code>&lt;script&gt;
  $(document).ready(function(){
      // Write on keyup event of keyword input element
      $("#kwd_search").keyup(function(){
          // When value of the input is not blank
          var term=$(this).val()
          if( term != "")
          {
              // Show only matching TR, hide rest of them
              $("#my-table1 tbody&gt;tr").hide();
              $("#my-table1 td").filter(function(){
                     return $(this).text().toLowerCase().indexOf(term ) &gt;-1
              }).parent("tr").show();
          }
          else
          {
              // When there is no input or clean again, show everything back
              $("#my-table1 tbody&gt;tr").show();
          }
      });
  });
  
  &lt;/script&gt;
  </code></pre>