i am using a form with several textbox elements which i want to validate and few which i dont want to, i am using jquery .not() for this but i am not getting the desired result am i making some ayntax error or something here is my code
function validateRegisterClick(){
var isValid = true;
// Validate User Information.
$('input[type=text], input[type=password]').not(':input[id$=txtMob], :input[id$=txtOfficeNo]').each(function () {
if ($(this).val().length <= 0) {
$(this).next()
.fadeIn('slow')
.removeClass()
.addClass('failure')
.fadeIn('slow')
.text("Can't be blank.");
isValid = false;
}
});
}
it also includes the txtMob and txtOfficeNo as i am using external javascript file so i am using this syntax
–thanks
Mac
changing the line in my above code solves the problem: