SheQu/Content/B-UI/BJUI/plugins/niceValidator/jquery.validator.themes.js
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/* ========================================================================
* for nice validate themes
* @since K'naan (xknaan@163.com)
* ======================================================================== */
+function ($) {
'use strict';
function fixedLeft($msgbox) {
var $input = $msgbox.prev(),
$btngroup = $msgbox.next(),
$icheck = $msgbox.closest('[data-icheck]'),
$ichecks = $icheck.siblings('[data-icheck="'+ $icheck.data('icheck') +'"]').andSelf(),
$upload = $msgbox.closest('.bjui-upload')
var offLeft = 0
if (($input && $input.isTag('select') && $input.is(':hidden')) && ($btngroup && $btngroup.hasClass('bootstrap-select'))) {
var $btngroup = $msgbox.next()
offLeft += $btngroup.outerWidth()
}
if ($icheck.length) {
$ichecks.each(function() {
offLeft += $(this).outerWidth()
})
$msgbox.children().css('top', -4)
}
if ($upload.length) {
offLeft += $upload.find('.bjui-upload-select').outerWidth()
}
return offLeft
}
var TPL_ARROW = '<span class="n-arrow"><b>◆</b><i>◆</i></span>'
$.validator.setTheme({
'simple_right': {
formClass: 'n-simple',
msgClass: 'n-right',
msgShow: function($msgbox, type) {
var $el = $msgbox.children()
var $el = $msgbox.children()
var $form = $msgbox.closest('form'),
fW = $form.width(),
fL = $form.offset().left,
eL = $msgbox.offset().left,
mw = $el.outerWidth()
var offLeft = fixedLeft($msgbox)
if ((fW - (eL - fL)) < (mw + offLeft + 8)) {
$msgbox.find('> .msg-wrap').addClass('wrap').width(fW - (eL - fL) - offLeft - 8)
.find('> .n-msg').width(fW - (eL - fL) - offLeft - 8 - 30)
}
$el.css({
left: offLeft,
opacity: 1
}).fadeIn(200)
},
后面还有 148 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
