zoukankan      html  css  js  c++  java
  • 点击帮助按钮改变鼠标形状

    $(function () {
    $('html *:not(#btn_helper_)').click(function (e) {
    hepler = false;
    $("html").css({ cursor: "url(''),auto" });
    //e.stopPropagation();
    });
    $("#btn_helper_").click(function (e) {
    $("html").css({ cursor: "url('images/bangzhu.cur'),auto" });
    hepler = true;
    e.stopPropagation();
    });});

    $(".submenu a").hover(function () {
    if (hepler == true)
    $(this).css({ cursor: "url('images/bangzhu.cur'),auto" });
    else {
    $(this).css({ cursor:"pointer" });
    }});

    $(".submenu a").click(function () {
    if (hepler == false) {
    $("img", $(".action").parent()).each(function(i, o) {
    var o = $(o);
    var url = $(o).attr("src");
    url = url.replace("c.png", ".png");
    $(o).attr("src", url);
    });
    $('.submenu a').removeClass('action');
    $(this).addClass('action');
    var img = $("img", $(this).parent()).eq(0);
    var url = img.attr("src");
    //用于修复图片消失 由于操作过程如果浏览器先触发hover会加上c.png点click后.png会被替换为c.png最终变成cc.png而使得图标不存在而消失
    if (url.indexOf("c.png") < 0)
    url = url.replace(".png", "c.png");
    img.attr("src", url);
    } else {
    //得到菜单id之后要根据这个id得到相应的帮助说明不要删了
    //alert("hehe "+$(this).parent().attr("onClick").split(',')[2]);
    var content;
    var t = $(this).find("span").html();
    var menuId = "";
    try {
    menuId = parseInt($(this).parent().attr("onClick").split(',')[2].replace("'", ""));
    } catch(e) {
    menuId = $(this).parent().attr("menuid");
    }
    $.post("index2.aspx?_method=getMenuContent", { menuId: menuId }, function (data) {
    content = data;
    $("#MenuComment").html(content);
    $("#MenuComment").show();
    $('#MenuComment').window({
    title: t,
    820,
    height: 500,
    modal: true,
    closable: true,
    minimizable: false,
    maximizable: true,
    collapsible: true
    });
    });
    $("html").css({ cursor: "url(''),auto" });
    hepler = false;
    }

    });

  • 相关阅读:
    jedisPool.returnBrokenResource 弃用
    错误,各种错误
    Spring加载resource时classpath*:与classpath:的区别
    Embedded database support
    IDEA 中 显示 *.properties 为中文
    Key promoter IDEA 快捷键 提示 插件
    Win7系统怎么删除今日热点【系统天地】
    win10深度清理c盘垃圾的方法【系统天地】
    win7系统如何清理注册表残留
    win10系统文件无法复制到u盘怎么办【系统天地】
  • 原文地址:https://www.cnblogs.com/kexb/p/4815295.html
Copyright © 2011-2022 走看看