I tried to do this:
$(document).ready(function(){
$("#formulario").submit(function(){
//Esse trecho não funciona
$(this "input").each(function(){});
});
});
I tried to do this:
$(document).ready(function(){
$("#formulario").submit(function(){
//Esse trecho não funciona
$(this "input").each(function(){});
});
});
You can use $("input", this)
or $(this).find("input")
.
Example:
$('div').each(function() {
$("input", this).val('teste'); // seta o value
$(this).find("input").attr('disabled', false); // tira o disabled
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><div><inputtype="text" disabled/>
</div>