0.1.6 • Published 10 years ago
kist-stylefileinput v0.1.6
kist-stylefileinput
Style file input elements. Heavily based on Filament Group’s jQuery Custom File Input.
Installation
npm install kist-stylefileinput --save
bower install kist-stylefileinput --save
Basic styling for file input is provided with CSS.
API
$Element.stylefileinput(options)
options
Type: Object|String
Options defined as Object
labels
Type: Object
Labels for elements.
Default value:
{
buttonBrowse: 'Browse',
buttonChange: 'Change',
val: 'No file selected'
}
classes
Type: Object
Classes for elements.
Default value:
{
wrapper: 'kist-Stylefileinput',
input: 'kist-Stylefileinput-input',
button: 'kist-Stylefileinput-button',
text: 'kist-Stylefileinput-text'
}
Options defined as String
destroy
Destroy plugin instance.
Examples
<input type="file" />
$('input').stylefileinput();
Caveats
- Opera Mini doesn’t fire
change
event when input value is changed so it won’re replace default text.
Browser support
Tested in IE8+ and all modern browsers.
License
MIT © Ivan Nikolić
MIT © Filament Group