|
It allows web-designers to style web forms on their own, using cutting-edge graphics.
For starter activate the function using the call:
$(function(){ $("select").uniform(); });
To “uniform” (transform) all possible form elements, just call:
$("select, input:checkbox, input:radio, input:file").uniform();
Optional parameters can be passed like this:
$("select").uniform({ param1: value, param2: value, param3: value });
Here are some key features of "Uniform":
Parameters:
· selectClass (string) - Default: "selector" - Sets the class given to the wrapper div for select elements. Ex.: $("select").uniform({selectClass: 'mySelectClass'});
· radioClass (string) - Default: "radio" - Sets the class given to the wrapper div for radio elements. Ex.: $(":radio").uniform({radioClass: 'myRadioClass'});
· checkboxClass (string) - Default: "checker" - Sets the class given to the wrapper div for checkbox elements. Ex.: $(":checkbox").uniform({checkboxClass: 'myCheckClass'});
· fileClass (string) - Default: "uploader" - Sets the class given to the wrapper div for file upload elements. Ex.: $(":file").uniform({fileClass: 'myFileClass'});
· filenameClass (string) - Default: "filename" - Sets the class given to div inside a file upload container that spits out the filename. Ex.: $(":file").uniform({filenameClass: 'myFilenameClass'});
· fileBtnClass (string) - Default: "action" - Sets the class given to div inside a file upload container that acts as the "Choose file" button. Ex.: $(":file").uniform({fileBtnClass: 'myFileBtnClass'});
· fileDefaultText (string) - Default: "No file selected" - Sets the text written in the filename div of a file upload input when there is no file selected. Ex.: $(":file").uniform({fileDefaultText: 'Select a file please'});
· fileBtnText(string) - Default: "Choose File" - Sets the text written on the action button inside a file upload input. Ex.: $(":file").uniform({fileBtnText: 'Choose…'});
· checkedClass (string) - Default: "checked" - Sets the class given to elements when they are checked (radios and checkboxes). Ex.: $(":radio, :checkbox").uniform({checkedClass: 'myCheckedClass'});
· focusClass (string) - Default: "focus" - Sets the class given to elements when they are focused. Ex.: $("select").uniform({focusClass: 'myFocusClass'});
· disabledClass (string) - Default: "disabled" - Sets the class given to elements when they are disabled. Ex.: $("select").uniform({disabledClass: 'myDisabledClass'});
· activeClass (string) - Default: "active" - Sets the class given to elements when they are active (pressed). Ex.: $("select").uniform({activeClass: 'myActiveClass'});
· hoverClass (string) - Default: "hover" - Sets the class given to elements when they are currently hovered. Ex.: $("select").uniform({hoverClass: 'myHoverClass'});
· useID (boolean) - Default: true - If true, sets an ID on the container div of each form element. The ID is a prefixed version of the same ID of the form element. Ex.: $("select").uniform({useID: false});
· 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". Ex.: $("select").uniform({idPrefix: 'container'});
· resetSelector (boolean/string)
Requirements:
· JavaScript enabled on client side
· jQuery 1.3 or higher
Via: Uniform 2.1.0
0 Comment:
Post a Comment