Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#cadastro-anunciante").ready(function(){
- //razao social
- $(".razaosocial").focus(function(){
- if($(".razaosocial").focus() == ' '){
- $(".razaosocial").css("background-color","red");
- $(".btn-cadastrar").attr("disabled");
- return false;
- }
- else{
- $(".btn-cadastrar").removeAttr("disabled");
- }
- });
- //inscricao municipal
- $(".ins_municipal").focus(function(){
- if($(".ins_municipal").focus() == ' '){
- $(".ins_municipal").css("background-color","red");
- $(".btn-cadastrar").attr("disabled");
- return false;
- }
- else{
- $(".btn-cadastrar").removeAttr("disabled");
- }
- });
- //rendereco de cobranca
- $(".end_cobranca").focus(function(){
- if($(".end_cobranca").focus() == ' '){
- $(".end_cobranca").css("background-color","red");
- $(".btn-cadastrar").attr("disabled");
- return false;
- }
- else{
- $(".btn-cadastrar").removeAttr("disabled");
- }
- });
- //cep
- $(".cep").focus(function(){
- if($(".cep").focus() == ' '){
- $(".cep").css("background-color","red");
- $(".btn-cadastrar").attr("disabled");
- return false;
- }
- else{
- $(".btn-cadastrar").removeAttr("disabled");
- }
- });
- //bairro
- $(".bairro").focus(function(){
- if($(".bairro").focus() == ' '){
- $(".bairro").css("background-color","red");
- $(".btn-cadastrar").attr("disabled");
- return false;
- }
- else{
- $(".btn-cadastrar").removeAttr("disabled");
- }
- });
- //numero
- $(".numero").focus(function(){
- if($(".numero").focus() == ' '){
- $(".numero").css("background-color","red");
- $(".btn-cadastrar").attr("disabled");
- return false;
- }
- else{
- $(".btn-cadastrar").removeAttr("disabled");
- }
- });
- //inscricao estadual
- $(".ins_estadual").focus(function(){
- if($(".estadual").focus() == ' '){
- $(".estadual").css("background-color","red");
- $(".btn-cadastrar").attr("disabled");
- return false;
- }
- else{
- $(".btn-cadastrar").removeAttr("disabled");
- }
- });
- //cnpj
- $(".cnpj").focus(function(){
- if($(".cnpj").focus() == ' '){
- $(".cnpj").css("background-color","red");
- $(".btn-cadastrar").attr("disabled");
- return false;
- }
- else{
- $(".btn-cadastrar").removeAttr("disabled");
- }
- });
- //endereco
- $(".endereco").focus(function(){
- if($(".endereco").focus() == ' '){
- $(".endereco").css("background-color","red");
- $(".btn-cadastrar").attr("disabled");
- return false;
- }
- else{
- $(".btn-cadastrar").removeAttr("disabled");
- }
- });
- //cidade
- $(".cidade").focus(function(){
- if($(".cidade").focus() == ' '){
- $(".cidade").css("background-color","red");
- $(".btn-cadastrar").attr("disabled");
- return false;
- }
- else{
- $(".btn-cadastrar").removeAttr("disabled");
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement