bootstrap-switch
bootstrap-switch copied to clipboard
Fontawesome instead of text
Is there a way to put a FontAwesome instead of text on data-on-text and data-off-text? Thanks
It looks like the code just takes whatever is written in OnText and OffText and pastes it verbatim inside a span.
I can't see any reason why initialising it with:
onText: '<i class="fa fa-check"></i> Yes', offText: '<i class="fa fa-times"></i> No'
should give you any problems.
As @jymbob pointed out, currently you can use HTML inside text strings. I will add it to documentation in future, as well as other common use cases.