title: Call JavaScript function from PagedListPager
body: <p>Is it possible to call a JavaScript function from within @Html.PagedListPager(<em>in here</em>) ?</p>
  
  <p>I have a button which calls the following function and performs all its supposed to with ease:</p>
  
  <pre><code>function fetchResults() {
      $.get('@Url.Action("Search", "Notifications")',
          {
              device: "Device"
          },
          function (data) {
              $('#results').html(data);
          })
  };
  </code></pre>
  
  <p>Now how can I do the same when I click on a page number on my PagedListPager?</p>
  
  <p>Currently my pager reloads the page and that's the main thing I want to avoid.</p>
  
  <p>This is my Pager:</p>
  
  <pre><code>@Html.PagedListPager((IPagedList)ViewBag.NotificationsPage, page =&gt; 
      Url.Action("Search", "Notifications", new
      {
          device = "Device",
          page = page
      }),
      PagedListRenderOptions.PageNumbersOnly)
  </code></pre>
  
  <p>Perhaps there's a much better way to do this. Help will be appreciated.</p>