Skip to content

Commit

Permalink
Add buttonClass and textClass options
Browse files Browse the repository at this point in the history
  • Loading branch information
datchung committed Jun 26, 2015
1 parent b969eb6 commit 74ce04b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/jquery-input-file-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

// Insert button after input file element
var button = $(
'<input type="button" value="' + options.text + '" />'
'<input type="button" value="' + options.text + '" class="' + options.buttonClass + '" />'
).insertAfter(this);

// Insert text after button element
var text = $(
'<span style="margin-left: 5px"></span>'
'<span style="margin-left: 5px" class="' + options.textClass + '"></span>'
).insertAfter(button);

// Open input file dialog when button clicked
Expand All @@ -55,7 +55,9 @@
return $.extend({
// Defaults
text: 'Choose File',
remove: false
remove: false,
buttonClass: '',
textClass: ''
}, userOptions);
};

Expand Down

0 comments on commit 74ce04b

Please sign in to comment.