So here is my problem.. the inputs appear in the same order as the span tag. I.e. :input[0] will match span[0]. However, I am not sure how my script will be able to see what the array number of the object is. Any suggestions? Note, var al is not an integer.
<script>
$('#submit').click(function(){
$(":input").each(function() {
if($(this).val() === "")
var al = $(this).eq();
$('span:eq('+al+')').fadeIn();
});
});
</script>
The callback provided to each will get the index of the currently processed element passed: