Introduction to a jquery-based tree plug-in (Orangetree) usage _jquery

Source: Internet
Author: User
Orangetree
Download Address: Orangetree

First of all, let's take a look at the demo!
First of all, I declare that my art skills are poor! This style everyone will be just a moment! I named this infinite-level tree plug-in orange tree, which is mainly divided into 3 levels of nodes:

The Head menu is the first level menu on the tree.
Parent menu, which is also the menu of nodes below
A child menu, a menu with no nodes below
Each node can control its style with CSS, please see the following table in detail:

Orangetree

. Orangetree Control
. First_node Default style for Head menu
. first_node_hover Head menu The style of the mouse move
. First_node_click The style of the mouse click after the Head menu
. First_node_subitem Child menu Style under the Head menu
. Item Parent Menu
. Item_node Parent menu Default Style
. Item_node_hover Parent menu The style of the mouse move
. Item_node_click Parent Menu Mouse-click Style
. Item_img_bg Parent menu Icon Style
. Subitem Child Menu
. Subitem span Child menu Default Style
. subitem_node_hover Child Menu The style of the mouse move
. Subitem_node_click Child Menu The mouse-click style
. SUBITEM_IMG_BG Child menu Icon Style
Note: The comment is (*) style recommended do not modify

JavaScript parameter Description:

Orangetree
Width Control width
Height Control height
Indent Level indent
View Initial display mode, expanded: All open, collapsed: all closed, Firstnode: Specifies the first few levels of the head (Firstnode specified)
Firstnode View for Firstnode This property specifies the first levels of the head to display
Single Specify display mode, can only fight a level directory
The specific usage is as follows:
Add a reference first
Copy Code code as follows:

<link href= "Styles/orangetree.css" rel= "stylesheet" type= "Text/css"/>
<script src= "Scripts/jquery-1.4.1.min.js" type= "Text/javascript" ></script>
<script src= "Scripts/orangetree.js" type= "Text/javascript" ></script>

Html
Copy Code code as follows:

<div class= "Orangetree" >
<ul>
<li>......</li>
......
</ul>
</div>

Javascript
Copy Code code as follows:

$ (document). Ready (function () {
$ (". Orangetree "). Orangetree ({
Width: 300px),
Height: "500px",
Indent:20,
View: "Collapsed",
Firstnode:1, single:false
});
});

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.