i have a button and some inputs, i want to let jquery check for me if none of the inputs is empty before doing some action : so this is what i've done :
$('#my_button)').click(function() {
if(
for(i=0;i<$('#my _button').parent().prev().children().children().length;i++){){ //this is to check if the inputs exist
$('#my_button').parent().prev().children().children().eq(i).val()!==''; // i've tried .val().is(:empty); but not working too
//so the test fails for somehow ! and the if condition doesn't work
// google chrome developers inspector gives me this error (Uncaught SyntaxError: Unexpected token for)
}
){
//do some action
}}
and this is my jsfiddl test !