On this code, it does not allow to save if any of table cell is empty, however, I want it now to save even the last table cell is null.
How can i add here for last input of table row where type is not hidden?
 $('#myTable tr input[value != add]:text').filter(function () {});
see my FIDDLE
This is my javascript code :
 $("#btnSave").click(function (event) {
        var flag = false;
        var emptyBoxes;
        var $rows = $('#myTable tr:not(:hidden)');
        $rows.each( function () {
            emptyBoxes = $('#myTable tr input[value != add]:text').filter(function () {
                return this.value == "";    
            });
            if (emptyBoxes.length != 0) {
                flag = true;
            }
        });
        if (flag) {
            alert("this cannot be empty");
            emptyBoxes.eq(0).focus();
        } else 
            alert("done");
    });
 
    