I'm having a hard time finding a way to do paging using AJAX. I am accustomed to doing it both traditionally and directly with the server using Codeigniter as the application framework . However, this time I need it done without the refresh of the page. Below is the pagination code made in Codeigniter. What is the correct way to use AJAX for this application?
# Preparando o limite da paginação
$de_paginacao = ( $de_paginacao < 0 || $de_paginacao == 1 ) ? 0 : (int) $de_paginacao;
# Carrega a biblioteca
$this->load->library(array('pagination'));
# Acessa o Model, executa a função get_all() e recebe os contatos
$pedidos = $this->model_pedido->get_all($de_paginacao, $this->pedidos_pagina);
# Paginação
$config_paginacao['base_url'] = site_url('admin/all/');
$config_paginacao['total_rows'] = $this->model_pedido->count_rows();
$config_paginacao['per_page'] = 10;
$this->pagination->initialize($config_paginacao);
$dados['html_paginacao'] = $this->pagination->create_links();
NOTE: This is Codeigniter's default paging code. Is there another way?