I have some ready-made functions that format date, take only strings numbers, block fields to not 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 that 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.