Song.Site/Templates/Web/Gov/CoreScripts/Public.js

(开头部分) 10KB

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

$(function () {
    mobileEvent();
    RightMenuDrop();
    MenuEvent();
    verifyCode();
    NavigationInit();
    //图片加载错误时,显示默认图片
    $("img").error(function () {
        var errImg = $(this).attr("default");
        if (errImg == null) return false;
        $(this).attr("src", errImg);
    });
});
//顶部右上方的下拉菜单
function RightMenuDrop() {
    $(".topright *[type]:visible").hover(function () {
        if ($(this)[0].tagName.toLowerCase() != "dl") {
            var type = $(this).attr("type"); //用于匹配下拉菜单的名称
            var off = $(this).offset();
            var drop = $(".topright *[type=" + type + "]:hidden"); //下拉菜单
            if (drop.size() < 1) drop = $(".topright *[type=" + type + "][state=drop]");
            drop.attr("state", "drop");
            drop.css({ left: off.left + $(this).width() + 10 - drop.outerWidth(),
                top: off.top + $(this).height(), position: 'absolute'
            }).css("z-index", 999);
            $(".topright *[type]").removeClass("icon-hover");
            $(this).addClass("icon-hover");
            $(".topright *[state=drop]").hide();
            drop.show();
        }
    }, function () { });
    $(".topright *[type]").hover(function () {
        window.dropHover = true;
    }, function () {
        window.dropHover = false;
        window.setTimeout(function () {
            if (!window.dropHover) {
                $(".topright *[state=drop]").hide();
                $(".topright *[type]").removeClass("icon-hover");
            }
        }, 100)
    });
}
//手机版二维码
function mobileEvent() {
    $("*[type=phone]").hover(function () {
        var btn = $(".phone");
        var off = $(".phone").offset();
        var qr = $("#qrcode");
        qr.css({ left: off.left + btn.width() - qr.outerWidth(), top: off.top + btn.height() });
        qr.show();
        window.phoneHover = true;
    }, function () {
        window.phoneHover = false;
        window.setTimeout(function () {
            if (!window.phoneHover)
                $("#qrcode").hide();
        }, 100)
    });
}
后面还有 241 行代码,解锁后查看完整代码

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

AI 解读

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

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