WebUI/Jquery-plugIn/js/search.min.js

(开头部分) 3KB

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

$(function () {
    $(window).resize(function () {
        var a = $("#search_box").offset().left + 96;
        $(".ui-autocomplete").css("left", a)
    }),
	$(".ui-autocomplete").css("height", "200px"),
	$.widget("custom.catcomplete", $.ui.autocomplete, {
	    _renderItem: function (a, b) {
	        var c = b.count >= 600 ? "大于" : "共";
	        return $("<li></li>").data("item.autocomplete", b).append("<a><span class='fl'>" + b.name + "</span><span class='fr'>" + c + "<i>" + b.count + "个</i>职位</span></a>").appendTo(a)
	    },
	    _renderMenu: function (a, b) {
	        var c = this,
			d = "";
	        $.each(b,
			function (b, e) {
			    e.category != d && (a.append("<li class='ui-autocomplete-category'>" + e.category + "</li>"), d = e.category),
				c._renderItemData(a, e)
			}),
			a.find(".ui-autocomplete-category:not(:first-child)").next().css("borderTop", "1px dashed #e5e5e5"),
			a.find(".ui-autocomplete-category").first().css("borderTop", "none")
	    }
	});
    var a = "";
    $("#search_input").catcomplete({
        minLength: 0,
        source: function (b, c) {
            "" != $.trim(b.term) ? $.ajax({
                url: ctx + "/suggest.json",
                dataType: "json",
                data: {
                    query: b.term
                },
                success: function (b) {
                    var d, e, f, g;
                    for (a = b.requestId, d = new Array, e = "", f = ["职位", "公司", "城市"], g = 0; g < b.content.length; g++) $.each(b.content[g],
					function (a, b) {
					    e = '{"name":"' + b.name + '","count":"' + b.count + '","type":"' + b.type + '","category":"' + f[g] + '"}',
						e = jQuery.parseJSON(e),
						d.push(e)
					});
                    c(d)
                }
            }) : c("")
        },
        focus: function () {
            return !1
        },
        select: function (b, c) {
            $("#requestId").val(a),
			$("#search_input").val(c.item.name);
            var d = encodeURIComponent(c.item.name);
            return $("#searchForm").attr("action", ctx + "/jobs/list_" + d),
			$("#search_button").trigger("click", [c.item.type, !0]),
			!1
        }
    }),
	$("#search_button").click(function (a, b, c) {
	    var d, e, f;
	    b && $("#spcInput").val(b),
后面还有 34 行代码,购买后查看完整代码

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

AI 解读 AI

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

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