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‘); } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ } },
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。