A jquery.validate bubble hint was made in the recent project.
Like the latest version of the Jquery.validate, there is this function, but it is not very useful in my place.
Just add one for yourself.
Find some plug-ins qtip2 style is good, but I do not show it locally. He also has an example of jquery.validate. But the style is not shown here. It seems the jquery version asked him to use his jquery to show it. I can't use mine to pit Dad. Give.
poshytip-1.1 This, the style is also good!
Positionx,positiony is the location where the prompts are displayed.
Copy Code code as follows:
$ (document). Ready (function () {
Validate the comment form when it is submitted
var myForm = $ (' Form:first ');
Myform.validate ({
Onkeyup:false,
Success:function (Element) {
var elem = $ (element);
Elem.poshytip (' Disable ');
Elem.poshytip (' Destroy ');
},
Errorplacement:function (Error, Element) {
var elem = $ (element);
if (!error.is (': Empty ')) {
Right: X=right;y=center
Left: X=left;y=center
On: X=inner-left
Under: X=center;y=bottom
var AX = "center";
if (elem.attr ("Positionx")!= null) {
AX = elem.attr ("Positionx");
}
var AY = "Bottom";
if (elem.attr ("positiony")!= null) {
AY = elem.attr ("Positiony");
}
Elem.filter (': not (. valid) '). Poshytip ({
Content:error,
Alignto: ' Target ',
Alignx:ax,
Aligny:ay,
offsetx:0,
Offsety:5
});
} else {
Elem.poshytip (' Disable ');
Elem.poshytip (' Destroy ');
}
}
});
});
There are problems
OnKeyUp can not be thought of ture, because of this, some validation, bubbles will always exist. This is unscientific. Do you have any good ideas?