493
| <![CDATA[<script type="text/javascript">
function reloadTelefones(pesquisa, reloadData, pagina) {
var ajaxLoadTimeout;
$.ajax({
url: 'telefones_ajax.php?input_pesquisa=' + pesquisa + '&pagina=' + pagina,
beforeSend: function(xhr) {
ajaxLoadTimeout = setTimeout(function() {
$('.btn-pesquisar i.fa-search').removeClass();
$('.btn-pesquisar i').addClass('fa fa-circle-o-notch fa-spin fa-fw');
}, 100);
}
}).done(function(data) {
clearTimeout(ajaxLoadTimeout);
$('.btn-pesquisar i').removeClass();
$('.btn-pesquisar i').addClass('fa fa-search');
$(reloadData).html(data);
var input_pesquisa = $('#form-pesquisa');
$('html').scrollTop(input_pesquisa.offset().top - 20);
});
}
/* Keyup function */
$('input[name="input_filter"]').on('keyup', function() {
var value = $(this).val().toLowerCase();
if (value.length < 3) {
value = '';
}
reloadTelefones(value, '#reloadTelefones', 1);
});
</script>]]>
|
695
| <![CDATA[<script type="text/javascript">
/* Click function */
var filtro = $('input[name="input_filter"]').val().toLowerCase();
var paginaAtual = $('.col-box-pagination li.active a').data('page');
$('.prev-page').on('click', function(){
var paginaAnterior = paginaAtual - 1;
if(paginaAnterior <= 0) {
return false;
}else{
reloadTelefones(filtro, '#reloadTelefones', paginaAnterior);
}
});
$('.next-page').on('click', function(){
var totalPaginas = $(this).data('totalpages');
var proximaPagina = paginaAtual + 1;
if(proximaPagina > totalPaginas) {
return false;
}else{
reloadTelefones(filtro, '#reloadTelefones', proximaPagina);
}
});
$('.page').on('click', function(){
var pagina = $(this).data('page');
reloadTelefones(filtro, '#reloadTelefones', pagina);
});
</script>]]>
|
1311
| <![CDATA[<script type='text/javascript'>//<![CDATA[
$(document).ready(function(){
// if no cookie
if ($.cookie('cookie-lgpd')!="true") {
$("#barra-cookies-lgpd").show();
$("#aceitar-cookies-lgpd").click(function() {
$("#barra-cookies-lgpd").hide();
// set the cookie for 24 hours
var date = new Date();
date.setDate(date.getDate() + 30);
$.cookie('cookie-lgpd', "true", { expires: date });
});
}
});//]]>
</script>]]>
|