how to hide any page element with mvc2 validation raising in asp.net
I want to hide a span whe开发者_运维知识库n the validation raised
I imagine you mean when validation is unsuccessful. You can do something like
formQueryObj.submit(function () {
var f = $(this).valid();
if (f === true) {
...
return true;
}
else{
...your hide span code like $('span#spanid').hide();
return false;
});
精彩评论