jquery树形结构下拉菜单特效代码下载


jquery树形结构下拉菜单特效代码下载
jquery树形结构下拉菜单特效代码下载以及树形结构、下拉菜单等js/jquery网页特效代码下载。

1. 引入CSS

<link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.css">
<link rel="stylesheet" href="demo/bower_components/jstree/dist/themes/default/style.min.css">
<link rel="stylesheet" href="demo/bower_components/AngularJS-Toaster/toaster.css">
<link rel="stylesheet" href="demo/bower_components/angular-busy/dist/angular-busy.css">
<link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.css">
<link rel="stylesheet" href="demo/bower_components/jstree/dist/themes/default/style.min.css">
<link rel="stylesheet" href="demo/bower_components/AngularJS-Toaster/toaster.css">
<link rel="stylesheet" href="demo/bower_components/angular-busy/dist/angular-busy.css">

2. 引入JS

<script src="demo/bower_components/jquery/jquery.min.js"></script>
<script src="demo/bower_components/bootstrap/bootstrap.min.js"></script>
<script src="demo/bower_components/angular/angular.min.js"></script>
<script src="demo/bower_components/angular-animate/angular-animate.min.js"></script>
<script src="demo/bower_components/angular-busy/dist/angular-busy.js"></script>
<script src="demo/bower_components/jstree/dist/jstree.min.js"></script>
<script src="demo/bower_components/AngularJS-Toaster/toaster.js"></script>
<script src="demo/bower_components/underscore/underscore-min.js"></script>
<script src="dist/ngJsTree.js"></script>
<script src="demo/app.js"></script>
<script src="demo/treeCtrl.js"></script>
<script src="demo/bower_components/jquery/jquery.min.js"></script>
<script src="demo/bower_components/bootstrap/bootstrap.min.js"></script>
<script src="demo/bower_components/angular/angular.min.js"></script>
<script src="demo/bower_components/angular-animate/angular-animate.min.js"></script>
<script src="demo/bower_components/angular-busy/dist/angular-busy.js"></script>
<script src="demo/bower_components/jstree/dist/jstree.min.js"></script>
<script src="demo/bower_components/AngularJS-Toaster/toaster.js"></script>
<script src="demo/bower_components/underscore/underscore-min.js"></script>
<script src="dist/ngJsTree.js"></script>
<script src="demo/app.js"></script>
<script src="demo/treeCtrl.js"></script>

3. HTML代码

<!DOCTYPE html>
<html>
    <head lang="en">
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>NgJsTree Demo Page</title>
        <!--sucai58.com 专注html3+css3素材的网站-->
        <style>
            body {
                padding-top: 50px;
            }
        </style>
    </head>
    <body ng-app="ngJsTreeDemo">
        <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="#"><i class="glyphicon glyphicon-tree-conifer"></i> ng-JsTree</a>
                </div>
                <div class="collapse navbar-collapse">
                    <ul class="nav navbar-nav">
                        <li class="active"><a href="#">Demo</a></li>
                        <li><a href="https://www.51qianduan.com/">51前端</a></li>
                    </ul>
                </div><!--/.nav-collapse -->
            </div>
        </div>
        <div class="container" ng-controller="treeCtrl as vm">
            <div class="row">
                <div class="col-xs-12 text-center">
                    <h2>Welcome to the ng-JsTree Demo Page</h2>
                </div>
            </div>
            <br/><br/>
            <div class="row" cg-busy="vm.promise">
                <toaster-container></toaster-container>
                <div class="col-xs-6">
                    <div class="panel panel-default">
                        <div class="panel-heading"><i class="glyphicon glyphicon-tree-conifer"></i> Js Tree</div>
                        <div class="panel-body">
                            <div js-tree="vm.treeConfig" should-apply="vm.applyModelChanges()" ng-model="vm.treeData" tree="vm.treeInstance" tree-events="ready:vm.readyCB;create_node:vm.createCB"></div>
                        </div>
                    </div>
                </div>
                <div class="col-xs-6">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <i class="glyphicon glyphicon-cog"></i> 一般设置</div>
                        <div class="panel-body">
                            <form class="form-horizontal" novalidate role="form">
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox" ng-model="vm.ignoreChanges"> 忽略模式的变化
                                    </label>
                                </div>
                                <br/>
                                <button class="btn btn-warning" type="button" ng-click="vm.reCreateTree()">创建树</button>
                                <button class="btn btn-success" type="button" ng-click="vm.simulateAsyncData()">负载异步节点</button>
                            </form>
                        </div>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <i class="glyphicon glyphicon-plus"></i> 添加节点</div>
                        <div class="panel-body">
                            <form class="form-horizontal" novalidate name="newNodeForm" role="form">
                                <div class="form-group">
                                    <label for="addNode" class="col-xs-3 control-label">节点的文本:</label>
                                    <div class="col-xs-9" ng-class="{ 'has-error' : newNodeForm.addNode.$invalid}">
                                        <input type="text" class="form-control" id="addNode" ng-model="vm.newNode.text" name="addNode" placeholder="Node Text" required>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="nodeParent" class="col-xs-3 control-label">节点的父:</label>
                                    <div class="col-xs-9" ng-class="{ 'has-error' : newNodeForm.nodeParent.$invalid}">
                                        <select class="form-control" id="nodeParent" name="nodeParent" ng-model="vm.newNode.parent" required>
                                            <option ng-repeat="node in vm.treeData" value="{{node.id}}">{{node.text}}[{{node.id}}]</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-xs-12">
                                        <div class="pull-right">
                                            <button type="button" ng-disabled="newNodeForm.$invalid" ng-click="vm.addNewNode()" class="btn btn-success">添加节点</button>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <i class="glyphicon glyphicon-edit"></i> 改变节点的类型</div>
                        <div class="panel-body">
                            <form class="form-horizontal" novalidate name="nodeTypeForm" role="form">
                                <div class="form-group">
                                    <label for="nodeParent" class="col-xs-3 control-label">节点:</label>
                                    <div class="col-xs-9" ng-class="{ 'has-error' : nodeTypeForm.node.$invalid}">
                                        <select class="form-control" id="node" name="node" ng-model="vm.selectedNode" required>
                                            <option ng-repeat="node in vm.treeData" value="{{node.id}}">{{node.text}}[{{node.id}}]</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="nodeParent" class="col-xs-3 control-label">类型:</label>
                                    <div class="col-xs-9" ng-class="{ 'has-error' : nodeTypeForm.newType.$invalid}">
                                        <select class="form-control" id="newType" name="newType" ng-model="vm.newType" required>
                                            <option value="default">Default</option>
                                            <option value="star">Star</option>
                                            <option value="cloud">Cloud</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-xs-12">
                                        <div class="pull-right">
                                            <button type="button" ng-disabled="nodeTypeForm.$invalid" ng-click="vm.setNodeType()" class="btn btn-success">设置类型</button>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12">
                    <b>Raw Data:</b> <pre>{{ vm.treeData | json }}</pre>
                </div>
            </div>
        </div>
    </body>
</html>

相关推荐

发表评论

相关文章