zoukankan      html  css  js  c++  java
  • jquery validate easyui tooltip

    jquery validate.js

    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');
                        }
                        //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                    }
                },
  • 相关阅读:
    jdk源码阅读笔记之java集合框架(四)(LinkedList)
    jdk源码阅读笔记之java集合框架(二)(ArrayList)
    jdk源码阅读笔记之java集合框架(三)(modCount)
    java文件拷贝的一点思考
    mac(10.11.5 )安装pt-query-digest所遇问题总结
    关于springboot启动所需所有jar包详解
    volatile的一点理解
    java 虚拟机自动内存管理
    虚拟机运行时数据区划分
    笔记本连上wifi(WiFi完全没问题)却无法上网
  • 原文地址:https://www.cnblogs.com/dotnetmvc/p/3641402.html
Copyright © 2011-2022 走看看