-1
I have this function of form when placing the price, automatically replaces the zeros for the values placed and keeps the fixed point:
$(function() {
$('.Preco2').maskMoney({ decimal: '.', thousands: ' ', precision: 2 });
})
In the html
do it this way:
<input type="text" class="form-control Preco2" name="Preco2[]" value="0.00">
But I use the function datatables
where it shows 5 lines per page:
(function ($) {$(document).ready(function () {
$('#employee_ta22').DataTable();
responsive: true
} );
$('#employee_ta22').dataTable({
"pagingType": "full_numbers",
"iDisplayLength": 5,
"oLanguage": {
"sProcessing": "Aguarde enquanto os dados são carregados ...",
"sLengthMenu": "Mostrar _MENU_ registos por página",
"sZeroRecords": "Nenhum registo correspondente ao criterio encontrado",
"sInfoEmtpy": "Exibindo 0 a 0 de 0 registos",
"sInfo": "Exibindo de _START_ a _END_ de _TOTAL_ registos",
"sInfoFiltered": "",
"sSearch": "<span class='glyphicon glyphicon-search'></span>",
"oPaginate": {
"sFirst": "<span class='glyphicon glyphicon-fast-backward'></span>",
"sPrevious": "<span class='glyphicon glyphicon-backward'></span>",
"sNext": "<span class='glyphicon glyphicon-forward'></span>",
"sLast": "<span class='glyphicon glyphicon-fast-forward'></span>"
}
}
});
})(jQuery);
The problem is that the class preco2
only works on the first page (in the first 5 lines) when it returns the table, on the second page and on the others it stops working.