Skip to content

Latest commit

 

History

History
153 lines (118 loc) · 5.36 KB

README.md

File metadata and controls

153 lines (118 loc) · 5.36 KB

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.

How to Use

Trigger the fancyfile via JavaScript

    $('input.fancyfile').fancyfile(options);

Markup

    <input name="upload" type="file" data-toggle="fancyfile" data-style="btn-primary">

Options

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.

Required

  • Twitter Bootstrap 2.0+
  • jQuery 1.7+

Installation

Download jQuery

Download Bootstrap

Download this plugin.

Include files in your HTML. The minimum required for this plugin are:

<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>

Recommend extensions

Startups & Apps

Author

Aleksej Gordejev ([email protected]).

License

(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.

Resources

Analytics

Bitdeli Badge