WebUI/AchieveManageWeb/Scripts/jquery-easyui-1.4.4/src/jquery.combobox.js

(开头部分) 19KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/**
 * jQuery EasyUI 1.4.4
 *
 * Copyright (c) 2009-2015 www.jeasyui.com. All rights reserved.
 *
 * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php
 * To use it on other terms please contact us: info@jeasyui.com
 *
 */
/**
 * combobox - jQuery EasyUI
 *
 * Dependencies:
 *   combo
 *
 */
(function ($) {
    var COMBOBOX_SERNO = 0;

    function getRowIndex(target, value) {
        var state = $.data(target, 'combobox');
        var opts = state.options;
        var data = state.data;
        for (var i = 0; i < data.length; i++) {
            if (data[i][opts.valueField] == value) {
                return i;
            }
        }
        return -1;
    }

    /**
	 * scroll panel to display the specified item
	 */
    function scrollTo(target, value) {
        var opts = $.data(target, 'combobox').options;
        var panel = $(target).combo('panel');
        var item = opts.finder.getEl(target, value);
        if (item.length) {
            if (item.position().top <= 0) {
                var h = panel.scrollTop() + item.position().top;
                panel.scrollTop(h);
            } else if (item.position().top + item.outerHeight() > panel.height()) {
                var h = panel.scrollTop() + item.position().top + item.outerHeight() - panel.height();
                panel.scrollTop(h);
            }
        }
    }

    function nav(target, dir) {
        var opts = $.data(target, 'combobox').options;
        var panel = $(target).combobox('panel');
        var item = panel.children('div.combobox-item-hover');
        if (!item.length) {
            item = panel.children('div.combobox-item-selected');
        }
        item.removeClass('combobox-item-hover');
        var firstSelector = 'div.combobox-item:visible:not(.combobox-item-disabled):first';
        var lastSelector = 'div.combobox-item:visible:not(.combobox-item-disabled):last';
        if (!item.length) {
后面还有 505 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。