Reputation: 73
How am I suppose to put fontawesome icon i.e
`<i class="fa fa-info" aria-hidden="true"></i>
`in a place of "Info" in below inner.html
Below is my javascript
dlg.innerHTML = "<span class='alert-headingg'>Info<" + "/span>";
Upvotes: 0
Views: 2322
Reputation: 782
<i class="icon-github"></i>
div.github:before
{
content: "\f09b";
font-family: FontAwesome;
}
Upvotes: 0
Reputation: 174
Try this You have to just put your icon element inside your span.It will work for you.
dlg.innerHTML = "<span class='alert-headingg'><i class="fa fa-info" aria-hidden="true"></i></span>";
Upvotes: 1