树状jquery导航条

    $(function () {
        $(".leftsecoundtitle").css({ "display": "none" });
        $("#id1").toggle(
      function () {
          $("#id1 + .leftsecoundtitle").slideDown("normal");
          $(this).css("background", "#E1E1E1");
          //$(".zsfl-item .zsfl-img").css("background", "#E1E1E1");
      },
      function () {
          $("#id1 + .leftsecoundtitle").slideUp("normal");
          $(this).css("background", "whiteSmoke");
      }

    );
    });

最终版
        $(function () {
            $(".leftsecoundtitle").css({ "display": "none" });
        });

        function MySlide(id) {
            if ($("#" + id + " + .leftsecoundtitle").css("display") == "none") {
                $("#" + id + " + .leftsecoundtitle").slideDown("normal");
                $("#"+id).css("background", "#E1E1E1");
            }
            else if ($("#" + id + " + .leftsecoundtitle").css("display") == "block") {
                $("#" + id + " + .leftsecoundtitle").slideUp("normal");
                $("#" + id).css("background", "whiteSmoke");
            }
        }

树状jquery导航条,布布扣,bubuko.com

树状jquery导航条

上一篇:js 委托事件的实现


下一篇:html input设置为只读属性