plusInputFile - JamyGolden/plus-ui GitHub Wiki

Typical usage

$('input[type="file"]').plusInputFile();

Default options:

$(el).plusInputFile({
  elAttrNames: {
    'elClass'         : '__element',
    'fauxElClass'     : '',
    'disabledClass'   : '--disabled',
    'buttonClass'     : '__button',
    'placeholderClass': '__placeholder'
  },
  namespace: 'plusui-form-file',
  placeholderText: 'No file chosen',
  buttonText: 'Choose File',
  onInit: null,
  onChange: function($el, $fauxEl, options){}
})

Options explanation

namespace, elAttrNames and the callback functions are explained in more detail on the wiki home page.

placeholderText

The text that appears within the placeholder when no file has yet been chosen.

buttonText

The text that appears within the button.