首页 > Web开发 > 详细

jquery validate easyui tooltip

时间:2014-04-03 12:06:47      阅读:596      评论:0      收藏:0      [点我收藏+]

jquery validate.js

 

bubuko.com,布布扣
onfocusin: function (element, event) {
                this.lastActive = element;

                // hide error label and remove error class on focus if enabled
                if (this.settings.focusCleanup && !this.blockFocusCleanup) {
                    if (this.settings.unhighlight) {
                        this.settings.unhighlight.call(this, element, this.settings.errorClass, this.settings.validClass);
                    }
                    this.addWrapper(this.errorsFor(element)).hide();
                }
                //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                this.element(element);
                if (this.errorList && this.errorList.length > 0) {
                    $("#" + element.id).tooltip({ position: right, showEvent: none, hideEvent: none, content: this.errorList[0].message }).tooltip(show);
                }
                //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
            },
            onfocusout: function (element, event) {
                if (!this.checkable(element) && (element.name in this.submitted || !this.optional(element))) {
                    this.element(element);
                }
                //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                $("#" + element.id).tooltip({ position: right, showEvent: none, hideEvent: none, content: ‘‘ }).tooltip(hide)
                if (!this.errorList || this.errorList.length <= 0) {
                    $("#" + element.id).tooltip({ position: right, showEvent: none, hideEvent: none, content: ‘‘ }).tooltip(destroy);
                }
                //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
            },
            onkeyup: function (element, event) {
                if (event.which === 9 && this.elementValue(element) === "") {
                    return;
                } else if (element.name in this.submitted || element === this.lastElement) {
                    this.element(element);
                    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                    if (this.errorList && this.errorList.length > 0) {
                        $("#" + element.id).tooltip({ position: right, showEvent: none, hideEvent: none, content: this.errorList[0].message }).tooltip(show);
                    }
                    else
                    {
                        $("#" + element.id).tooltip({ position: right, showEvent: none, hideEvent: none, content: ‘‘ }).tooltip(destroy);
                    }
                    //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                }
            },
bubuko.com,布布扣

jquery validate easyui tooltip,布布扣,bubuko.com

jquery validate easyui tooltip

原文:http://www.cnblogs.com/dotnetmvc/p/3641402.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!