Browsers do not let you style file inputs. Fancy File Plugin fixes this problem. It is written using JavaScript and jQuery. See Fancy File Plugin demo.
Trigger the fancyfile via JavaScript
$('input.fancyfile').fancyfile(options);
<input name="upload" type="file" data-toggle="fancyfile" data-style="btn-primary">
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-text=""
.
Name | type | default | description |
---|---|---|---|
text | boolean | string | Select File | insert text into the fancyfile button. |
icon | boolean | string | icon-file | insert icon into the fancyfile button. |
style | string | apply button style to the fancyfile button. | |
placeholder | boolean | string | Select File… | apply placeholder to the fancyfile fake input. |
- Twitter Bootstrap 2.0+
- jQuery 1.7+
Download jQuery
- Download the latest release
- Clone in Windows
- Clone the repo:
git clone git://github.com/jquery/jquery.git
.
Download Bootstrap
- Download the latest release.
- Clone in Windows
- Clone the repo:
git clone git://github.com/twitter/bootstrap.git
. - Install with Twitter's Bower:
bower install bootstrap
.
- Download the latest release
- Clone in Windows
- Clone the repo:
git clone git://github.com/biggora/bootstrap-fancyfile.git
- Install with Bower:
bower install bs-fancyfile
<link href="/path/to/bootstrap.css" rel="stylesheet">
<link href="/path/to/bootstrap-fancyfile.css" rel="stylesheet">
<script src="/path/to/jquery.js" type="text/javascript"></script>
<script src="/path/to/bootstrap-fancyfile.js" type="text/javascript"></script>
- Bootstrap Ajax Typeahead Plugin
- Bootstrap Select Plugin
- Bootstrap Slider Plugin
- TrinteJS - Javascrpt MVC Framework for Node.JS
- CaminteJS - Cross-db ORM for NodeJS
- MongoDB Session Storage for ExpressJS
- Middleware exposing user-agent for NodeJS
- 2CO NodeJS adapter for 2checkout API payment gateway
Aleksej Gordejev ([email protected]).
(The MIT License)
Copyright (c) 2012 Aleksej Gordejev [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Visit the author website.
- Follow @biggora on Twitter for updates.
- Report issues on the github issues page.