2
I have some ready-made functions that format date, take only string numbers, block fields so as not to allow letters etc. Examples:
function formatarData(data){
// conteúdo da função
return data;
}
function somenteNumeros(campo){
// conteúdo da função
}
How do I add this to jQuery so it works like this:
var dataFormatada = $("#data").val().formatarData();
$("#cpf").somenteNumeros();
My intention is to have a custom jQuery for me to reuse in my applications.
http://stackoverflow.com/questions/9550866/how-to-create-custom-jquery-function-and-how-to-use-it
– Daniel Omine
Settle this with jQuery fn extend
– Will