1
I have two elements, horaFim and horaInicio that are two inputs and both have the class hour.
With each need to have the value of the two separated into variables.
$('.hora').each(function (){
var horaFinal = $('.horaFinal').val();
var horaInicio = $('.horaInicio').val();
})
But when I do that my inputs are empty.
Can you explain in what context you’re using that code? put what’s around it so we can understand the context better.
– Sergio
What is the purpose? are only two inputs.
– Gabriel Rodrigues