Skip to content

Commit

Permalink
Removed unnecessary stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
hleinone committed Oct 4, 2011
1 parent a9444c0 commit 338b63e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions README.md
Expand Up @@ -5,7 +5,7 @@ Stylable <input type="file"> for jQuery.
You can't style HTML file inputs. They'll always look fugly.

## The Solution
JavaScript magic! Wrapping the file input on a div, adding the replacement element to provide the visuals and then making the original input invisible. The clicks to the replacement element are propagated to the original input.
JavaScript magic! Wrapping the file input on a div, adding the replacement element to provide the visuals and then making the original input invisible. The clicks to the replacement element are propagated to the original input on the browsers that support it, otherwise a transparent file input is placed on top of the replacement.

### Let Me Show You How

Expand All @@ -22,13 +22,6 @@ JavaScript magic! Wrapping the file input on a div, adding the replacement eleme
...
<input type="file" name="foo" />

...will end up as...

<div class="fileinput-wrapper" style="position: relative; display: inline-block; overflow: hidden;">
<button class="fileinput">Browse...</button>
<input type="file" name="foo" tabindex="-1" style="font-size: 100px; height: 100%; opacity: 0; position: absolute; right: 0px; top: 0px; z-index: -1;">
</div>

### The API

#### .fileinput([replacement])
Expand Down

0 comments on commit 338b63e

Please sign in to comment.