0.1.6 • Published 10 years ago

kist-stylefileinput v0.1.6

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

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

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

11 years ago

0.1.0

11 years ago