jQuery 插件 Zelect
- 授权协议: WTFPL
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/mtkopone/zelect
软件介绍
Zelect 是一个能够创建自定义 <select> 元素的 jQuery 插件。
特征:
轻量
没有 CSS
可自定义
异步分页加载大型选项列表 (read: AJAX-ready-and-enabled)
再也个分离或隐藏的 DOM 节点初始化
编程方式可选且多变
Unit-tested
代码示例:
$('select').on('ready', function() { $('form').enable() })
$('select').on('change', function(evt, item) { $('form input.id-container').val(item.id) })
$('select').zelect({
throttle: 150,
placeholder: $('<i>').text('Which one...'),
loader: loader,
renderItem: renderer,
noResults: noResultser
}
function loader(term, page, callback) {
$.get('/q', { q:term, p:page }).then(function(items) {
var result = _(items).map(function(item) {
return { text:item.content, img:item.imageUrl || 'default.png', id:item.uniqueId }
}
callback(result)
}
}
function renderer(item, term) {
return $('<div>')
.append($('<img>').attr('src', item.img))
.append($('<span>').addClass('content').text(item.label))
}
function noResultser(term) {
return $('<span>').addClass('no-results').text(term + "didn't hit anything.")
}The Mechanics of Web Handling
David R. Roisum
This unique book covers many aspects of web handling for manufacturing, converting, and printing. The book is applicable to any web including paper, film, foil, nonwovens, and textiles. The Mech......一起来看看 《The Mechanics of Web Handling》 这本书的介绍吧!
