# jQuery.miller.js
## An implementation of [Miller columns](http://en.wikipedia.org/wiki/Miller_columns) with [jQuery](http://jquery.com)!
It's a work in progress, so use it carefully!
If you want to see this plugin in action, there is a [demo](http://mgbx.net/demomiller).
## Features
* Ajax call to retrieve data.
* Keyboard navigation.
* Full customizable preview pane.
* Full customizable toolbar.
* Redimensionable columns.
## How to use it ?
There is no dependencies needed to use this plugin.
To use it:
1. Clone the repository or download the source in a directory.
2. Add this line in the head of your html page:--
``` html
<link href="url/to/css/jquery.miller.css" media="screen" rel="stylesheet" type="text/css" />
```
3. Add a `div` in the body of your html page.
4. Add these lines at the end of the body of your html page:
``` html
<script type="text/javascript" src="url/to/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="url/to/js/jquery.miller.js"></script>
```
5. Create a JavaScript script with this content and add it t the end of the body of your html page:
``` JavaScript
$(document).ready(function() { $('div').miller() });
```
You can pass an object litteral to the `miller` function to customize behavior of the plugin.
The default values are :
``` JavaScript
{
url: function(id) { return id; }, // generate url for ajax call, id is the value of the node ID
minWidth: 40, // minimum width of one column
tabindex: 0, // default tabindex if it is undefined on the DOM element
carroussel: false, // If set to true, the user will go to the first item of the column if it use ↓ on the last item
toolbar: {
options: {} // Add callbacks here to handle actions in the toolbar, see the demo for more informations
},
pane: {
options: {} // Add callbacks here to handle actions in the pane, see the demo for more informations
}
}
```
The ajax call must return a JSON array with the following structure:
``` JavaScript
[
{ 'id': 'ID of node 1', 'name': 'Name of node 1', 'parent': false }, // this node has no child
{ 'id': 'ID of node 2', 'name': 'Name of node 2', 'parent': true }, // this node has some children
{ 'id': 'ID of node 3', 'name': 'Name of node 3', 'parent': false }, // this node has no child
// and so on…
]
```
用jQuery实现米勒列_JavaScript_下载.zip
版权申诉
7 浏览量
2023-04-04
22:56:16
上传
评论
收藏 220KB ZIP 举报
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
最新资源
- win10-64位画图cab安装包Microsoft-Windows-MSPaint
- 基于C#财务管理系统设计与实现
- 封装redis常用基本命令.zip
- 基于python的图书推荐管理系统设计与实现
- Termius 7.13.0 (windows免登录版)
- 基于STM32F072C8T6单片机PWM波控制蜂鸣器实验软件例程 KEIL工程源码+核心板硬件PDF原理图.zip
- debian package
- Redis 命令脑图.zip
- 机器学习使用Stable Diffusion实现潜在空间搜索
- 基于Python+tkinter+MySQL的图书管理系统+设计报告+PPT(课程设计高分项目).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈