jquery Validate Poshytip Custom style _jquery

Source: Internet
Author: User
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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.