-2
-I’m testing to load the rest just put an id on the body to see if it would
<script type="text/javascript" >
$(document).ready(function() {
$("#body").load(function(){
var tip = $(this).find("#sessaocad").val();
if (tip == "Banco"){
$("#tipousu").css("display","none");
$("#tipousulbl").css("display","none");
$("#tiposang").css("display","none");
$("#tiposanglbl").css("display","none");
$("#rg").css("display","none");
$("#cnpj").css("display","block");
}
if (tip == "Pessoa"){
//MOSTRA
$("#tipousu").css("display","block");
$("#tipousulbl").css("display","block");
$("#tiposang").css("display","block");
$("#tiposanglbl").css("display","block");
$("#rg").css("display","block");
$("#cnpj").css("display","none");
}
});
});
</script>
What you got as a result?
– Boneco Sinforoso
nothing, the page loads but depending on my login type it would have to be changed but I think as the function is only called after the page load no changes is made, so I wonder if there is any way that jquery can be executed before the page is loaded
– Haslo D