Uniform
=======
Sexy form elements with jQuery. Now with HTML5 attributes!
Version 2.1.1
Works well with jQuery 1.6+, but we've received patches and heard that this works with jQuery 1.3.
Licensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php)
Installation
------------
Installation of Uniform is quite simple. First, make sure you have jQuery installed. Then you’ll want to link to the jquery.uniform.js file and uniform.default.css in the head area of your page. Here's what your `<head>` tag contents should probably contain:
<!-- Make sure your CSS file is listed before jQuery -->
<link rel="stylesheet" href="uniform.default.css" media="screen" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script src="jquery.uniform.js"></script>
This relies upon a copy of jquery.uniform.js, uniform.default.css and the various images all being available on your webserver.
Basic usage
-----------
Using Uniform is easy. Simply tell it what elements to style:
// Style all <select> elements
$("select").uniform();
To "uniform" all possible form elements, just do something like this. Things that can't get styled appropriately will be skipped by Uniform.
// Style everything
$("select, input, a.button, button").uniform();
You can exclude elements too by using more jQuery selectors or methods:
// Avoid styling some elements
$("select").not(".skip_these").uniform(); // Method 1
$('select[class!="skip_these"]').uniform(); // Method 2
A complete set of tags in the HEAD section of your site can therefore look like this:
<!-- Make sure your CSS file is listed before jQuery -->
<link rel="stylesheet" href="uniform.default.css" media="screen" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script src="jquery.uniform.js"></script>
<script type='text/javascript'>
// On load, style typical form elements
$(function () {
$("select, input, button").uniform();
});
</script>
Extra parameters
----------------
You can pass in extra parameters to control certain aspects of Uniform. To pass in parameters, use syntax like what is seen here. This only changes the settings for the elements that are actually uniformed in this particular call.
$("select").uniform({
param1: value,
param2: value,
param3: value
});
There is a separate listing of global defaults. You access them by using the `defaults` property. *Note: This property name changed in v2.0.*
$.uniform.defaults.checkedClass = "uniformCheckedClass";
$.uniform.defaults.fileBtnHtml = "Pick a file";
Uniform v1.x had a bug where setting values in the call to `.uniform()` also potentially reset the defaults and redrew other uniformed objects with new settings. As of version 2.0.0 the global defaults are now completely separate from the settings passed to every `.uniform()` call. Extra parameters defined when instantiating Uniform are not global and can't be recalled from `$.uniform.defaults` later.
### activeClass (string)
*Default:* "active"
Sets the class given to elements when they are active (pressed).
$("select").uniform({activeClass: 'myActiveClass'});
### autoHide (boolean)
*Default:* true
If this option is set to true, Uniform will hide the new elements if the existing elements are currently hidden using `display: none`.
If you want to show a select or checkbox you'll need to show the new Uniform div instead of the child element.
### buttonClass (string)
*Default:* "button"
Sets the class given to a button that's been Uniformed
$("input[type=button]").uniform({buttonClass: 'myBtnClass'});
### checkboxClass (string)
*Default:* "checker"
Sets the class given to the wrapper div for checkbox elements.
$(":checkbox").uniform({checkboxClass: 'myCheckClass'});
### checkedClass (string)
*Default:* "checked"
Sets the class given to elements when they are checked (radios and checkboxes).
$(":radio, :checkbox").uniform({checkedClass: 'myCheckedClass'});
### disabledClass (string)
*Default:* "disabled"
Sets the class given to elements when they are disabled.
$("select").uniform({disabledClass: 'myDisabledClass'});
### eventNamespace (string)
*Default:* ".uniform"
Binds events using this namespace with jQuery. Useful if you want to unbind them later. Shouldn't probably need to be changed unless it conflicts with other code.
$("select").uniform({eventNamespace: '.uniformEvents'});
### fileButtonClass (string)
*Default:* "action"
Sets the class given to div inside a file upload container that acts as the "Choose file" button.
$(":file").uniform({fileButtonClass: 'myFileBtnClass'});
### fileButtonHtml (string)
*Default:* "Choose File"
Sets the text written on the action button inside a file upload input.
$(":file").uniform({fileButtonHtml: 'Choose …'});
### fileClass (string)
*Default:* "uploader"
Sets the class given to the wrapper div for file upload elements.
$(":file").uniform({fileClass: 'myFileClass'});
### fileDefaultHtml (string)
*Default:* "No file selected"
Sets the text written in the filename div of a file upload input when there is no file selected.
$(":file").uniform({fileDefaultHtml: 'Select a file please'});
### filenameClass (string)
*Default:* "filename"
Sets the class given to div inside a file upload container that spits out the filename.
$(":file").uniform({filenameClass: 'myFilenameClass'});
### focusClass (string)
*Default:* "focus"
Sets the class given to elements when they are focused.
$("select").uniform({focusClass: 'myFocusClass'});
### hoverClass (string)
*Default:* "hover"
Sets the class given to elements when they are currently hovered.
$("select").uniform({hoverClass: 'myHoverClass'});
### idPrefix (string)
*Default:* "uniform"
If useID is set to true, this string is prefixed to element ID’s and attached to the container div of each Uniformed element. If you have a checkbox with the ID of "remember-me" the container div would have the ID "uniform-remember-me".
$("select").uniform({idPrefix: 'container'});
### inputAddTypeAsClass (boolean)
*Default:* true
When true, `<input>` elements will get a class applied that is equal to their "type" attribute.
$("input").uniform({inputAddTypeAsClass: true});
### inputClass (string)
*Default:* "uniform-input"
Applies this class to all input elements when they get uniformed.
$("input").uniform({inputClass: "inputElement"});
### radioClass (string)
*Default:* "radio"
Sets the class given to the wrapper div for radio elements.
$(":radio").uniform({radioClass: 'myRadioClass'});
### resetDefaultHtml (string)
*Default:* "Reset"
This text is what's shown on form reset buttons. It is very similar to submitDefaultHtml.
$("input[type='reset']).uniform({resetDefaultHtml: "Clear"});
### resetSelector (boolean/string)
*Default:* false
This parameter allows you to use a jQuery-style selector to point to a "reset" button in your form if you have one. Use false if you have no "reset" button, or a selector string that points to the reset button if you have one.
$("select").uniform({resetSelector: 'input[type="reset"]'});
### selectAutoWidth (boolean)
*Default:* true
If this option is set to true, Uniform will try to fit the select width to the actual content. When false, it forces the selects to all be the width that was specified in the theme.
When using auto widths, the size of the element is detected, then wrapped by Uniform and expanded to fit the wrapping.
If you want to specify a size of a select element and then have Uniform wrap it appropriately, there will be some difficulty. The size of the element needs to get detected and then will be changed by Uniform. For this to happen, it is suggested you do one of these solutions when you have issues.
* Set a custom inline width for the element (`<select style="width
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
本项目是一款基于Django开发的,前后端分离的手机web端租房项目。开发周期为两到三天,前端页面 已经写好,接口文档也已经写好,后端只需实现业务逻辑即可。项目使用于Django项目(一)结束的项目 实战,能够夯实同学们的Django基础知识。 项目中主要使用到的技术栈: Django+mysql+redis+celery+fastdfs+python3.6 注意事项: 为了方便开发调试,直接使用Django静态文件管理系统来代理静态页面。
资源推荐
资源详情
资源评论
收起资源包目录
Django开发租房系统源码 (365个子文件)
client.conf 1KB
bootstrap.css 143KB
bootstrap.min.css 118KB
font-awesome.css 34KB
font-awesome.min.css 28KB
bootstrap-theme.css 26KB
bootstrap-datepicker3.standalone.css 23KB
bootstrap-theme.min.css 23KB
bootstrap-datepicker3.css 22KB
bootstrap-datepicker3.standalone.min.css 21KB
bootstrap-datepicker3.min.css 21KB
swiper.css 20KB
bootstrap-datepicker.standalone.css 18KB
bootstrap-datepicker.css 17KB
swiper.min.css 17KB
bootstrap-datepicker.standalone.min.css 16KB
bootstrap-datepicker.min.css 15KB
simple-line-icons.css 11KB
uniform.default.css 11KB
simple-line-icons.min.css 9KB
uniform.default.min.css 8KB
bootstrap-switch.css 7KB
bootstrap-switch.min.css 6KB
detail.css 5KB
search.css 3KB
profile.css 2KB
newhouse.css 2KB
index.css 2KB
booking.css 2KB
orders.css 2KB
myhouse.css 2KB
my.css 2KB
register.css 1KB
login.css 966B
reset.css 435B
main.css 224B
fontawesome-webfont.eot 75KB
Simple-Line-Icons.eot 35KB
glyphicons-halflings-regular.eot 20KB
newhouse.html 15KB
detail.html 8KB
lorders.html 6KB
index.html 6KB
orders.html 5KB
search.html 4KB
register.html 4KB
profile.html 3KB
myhouse.html 3KB
my.html 3KB
auth.html 3KB
booking.html 2KB
login.html 2KB
favicon.ico 3KB
IHome.iml 1KB
home01.jpg 418KB
home02.jpg 407KB
home03.jpg 303KB
timg (1).jpg 54KB
timg.jpg 31KB
landlord01.jpg 5KB
swiper.jquery.js 160KB
jquery.min.js 94KB
bootstrap.js 68KB
swiper.jquery.min.js 67KB
bootstrap-datepicker.js 55KB
bootstrap.min.js 36KB
bootstrap-datepicker.min.js 32KB
jquery.uniform.js 26KB
bootstrap-switch.js 25KB
jquery.form.min.js 15KB
bootstrap-switch.min.js 15KB
jquery.blockui.min.js 9KB
jquery.uniform.min.js 8KB
search.js 7KB
icons-lte-ie7.js 6KB
register.js 6KB
template.js 5KB
index.js 4KB
lorders.js 4KB
booking.js 3KB
newhouse.js 3KB
orders.js 3KB
auth.js 2KB
profile.js 2KB
detail.js 2KB
login.js 1KB
my.js 976B
bootstrap-datepicker.ka.min.js 967B
bootstrap-datepicker.km.min.js 945B
bootstrap-datepicker.kh.min.js 945B
bootstrap-datepicker.th.min.js 833B
myhouse.js 799B
bootstrap-datepicker.el.min.js 764B
bootstrap-datepicker.hy.min.js 738B
bootstrap-datepicker.uk.min.js 722B
bootstrap-datepicker.ar.min.js 714B
bootstrap-datepicker.ru.min.js 704B
bootstrap-datepicker.ar-tn.min.js 704B
bootstrap-datepicker.fa.min.js 670B
bootstrap-datepicker.mk.min.js 657B
共 365 条
- 1
- 2
- 3
- 4
资源评论
yblackd
- 粉丝: 71
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 课高分程设计-基于C++实现的民航飞行与地图简易管理系统-南京航空航天大学
- 航天器遥测数据故障检测系统python源码+文档说明+数据库(课程设计)
- 北京航空航天大学操作系统课设+ppt+实验报告
- 基于Vue+Echarts实现风力发电机中传感器的数据展示监控可视化系统+源代码+文档说明(高分课程设计)
- 基于单片机的风力发电机转速控制源码
- 基于C++实现的风力发电气动平衡监测系统+源代码+测量数据(高分课程设计)
- 毕业设计- 基于STM32F103C8T6 单片机,物联网技术的太阳能发电装置+源代码+文档说明+架构图+界面截图
- 基于 LSTM(长短期记忆)(即改进的循环神经网络)预测风力发电厂中风力涡轮机产生的功率+源代码+文档说明
- 基于stm32f103+空心杯电机+oled按键+运动算法
- 《CKA/CKAD应试指南/从docker到kubernetes 完全攻略》学习笔记 第1章docker基础(1.1-1.4)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功