Home  >  Article  >  Web Front-end  >  jquery's simplest attribute menu_jquery

jquery's simplest attribute menu_jquery

WBOY
WBOYOriginal
2016-05-16 18:45:041285browse

1.0 Create a

    menu tree! And shadow the sub-options!
    2.0 Join!

    Copy code The code is as follows:

    $("li:has(ul)"). click(
    function (){$(this).children("ul").css("display")=='none'?$(this).children("ul").show("slow" ):$(this).children("ul").hide("slow");
    }
    );

    3.0 You're done!
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn