Skip to content

Instantly share code, notes, and snippets.

@garrus
Created June 5, 2013 13:55
Show Gist options
  • Save garrus/5714039 to your computer and use it in GitHub Desktop.
Save garrus/5714039 to your computer and use it in GitHub Desktop.
traps:
when use button as the _button target of FileUploader, it will create a input[type=file] in the tag, which looks like this:
<button id="upload-button"> <input type="file" /></button>
now, if you attempt to use bootstrap's button text functionality, like this:
<button id="upload-button" data-loading-text="Loading"><input type="file" /><button>
$('#upload-button').button();
and when you change the text and change it back, the events binder to input[type=file] will be lost.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment