With each
you can do it this way:
var bandera = false;
$(".hour").each(function(){
if ( $(this).val() !== '0' )
bandera = true;
});
if (bandera)
alert("Hay datos distintos");
else
alert("Son ceros");
The only thing that you must define correctly is your selector so that the event makes the correct match of the elements you want.
$(".send").click(function(){
var bandera = false;
$(".hour").each(function(){
if ( $(this).val() !== '0' )
bandera = true;
});
if (bandera)
alert("Hay datos distintos");
else
alert("Son ceros");
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="text" value="0" class="hour">
<input type="text" value="0" class="hour">
<input type="text" value="0" class="hour">
<input type="text" value="0" class="hour">
<input type="text" value="0" class="hour">
<input type="button" value="ver" class="send">
Note : Change the values of the inputs to see the results