Reputation: 473
I would like display a font awesome icon as the submit input value. I tried the following code as per this SO question Font-awesome, input type 'submit'
Demo http://jsfiddle.net/sw87W/1077/
$(document).ready(function() {
$('.btn-primary').val('');
});
I do not have any control over the html that is generated, therefore I can not change the input
to a button
Upvotes: 0
Views: 261
Reputation: 96339
You can just use the Unicode escape sequence instead:
$('.btn-primary').val('\uf0c7');
Upvotes: 3