Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Works for me: </p> <ul> <li><a href="http://duckranger.com/2012/06/pretty-file-input-field-in-bootstrap/" rel="nofollow">Pretty file input field in Bootstrap</a></li> </ul> <h3>Update</h3> <p><a href="https://gist.github.com/fguillen/4753912" rel="nofollow">jQuery plugin style</a>:</p> <pre class="lang-js prettyprint-override"><code>// Based in: http://duckranger.com/2012/06/pretty-file-input-field-in-bootstrap/ // Version: 0.0.3 // Compatibility with: Bootstrap 3.2.0 and jQuery 2.1.1 // Use: // &lt;input class="nice_file_field" type="file" data-label="Choose Document"&gt; // &lt;script&gt; $(".nice_file_field").niceFileField(); &lt;/script&gt; // (function( $ ) { $.fn.niceFileField = function() { this.each(function(index, file_field) { file_field = $(file_field); var label = file_field.attr("data-label") || "Choose File"; file_field.css({"display": "none"}); nice_file_block_text = '&lt;div class="input-group nice_file_block"&gt;'; nice_file_block_text += ' &lt;input type="text" class="form-control"&gt;'; nice_file_block_text += ' &lt;span class="input-group-btn"&gt;'; nice_file_block_text += ' &lt;button class="btn btn-default nice_file_field_button" type="button"&gt;' + label + '&lt;/button&gt;'; nice_file_block_text += ' &lt;/span&gt;'; nice_file_block_text += '&lt;/div&gt;'; file_field.after(nice_file_block_text); var nice_file_field_button = file_field.parent().find(".nice_file_field_button"); var nice_file_block_element = file_field.parent().find(".nice_file_block"); nice_file_field_button.on("click", function(){ console.log("click"); file_field.click() } ); file_field.change( function(){ nice_file_block_element.find("input").val(file_field.val()); }); }); }; })( jQuery ); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload