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
Object
Options defined as 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'
String
Options defined as destroy
Destroy plugin instance.
Examples
;
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