-1
<div id="paginadorMocado">
<nav aria-label="Page navigation example">
<ul class="pagination" id="paginacao">
<!--
<li class="page-item"><a class="page-link" href="#">Anterior</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(1);">1</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(2);">2</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(3);">3</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(4);">4</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(5);">5</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(6);">6</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(7);">7</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(8);">8</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(9);">9</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(10);">10</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(11);">11</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(12);">12</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(13);">13</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(14);">14</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(15);">15</a></li>
<li class="page-item"><a class="page-link" href="#" onclick="pagina(16);">16</a></li>
<li class="page-item"><a class="page-link" href="#">Próx</a></li>
-->
</ul>
</nav>
</div>
if(cont === 0){
var qtdPagina = parseInt(v0.qtderegistros / 20);
var c = 1;
$('#paginacao').html("");
for (var i = 1; i <= qtdPagina; i++) {
$('#paginacao').append("<li class='page-item'><a class='page-link' href='#' onclick='pagina("+i+");'>"+i+"</a></li>");
}
}
There are pages of mine that are loading more than 100 pages and I am not able to solve this problem...
– Vinicius Mendes
A tip! I use this library on my websites: https://packagist.org/packages/coffeecode/paginator . It’s from the Upinside instructor, Robson, very easy to use. Take a look at the end of the page of one of my sites where I use the package: https://www.financecontrol.com.br/blog
– Rodrigo Carvalho de Brito
It has a very simple way that I always use: https://www.youtube.com/watch?v=FOAJ2EQNtCk
– Heitor Scalabrini