Reputation: 924
I am developing a simple project using bootstrap. I have this code that can create a button inside a dataTable and it is working fine. I try to put an image to it not glyphicons
by the code that I provided below as you can see.. But it's not working. But the glyphicon
icon in First button is working.
{ data: "ActionMenu", title: "Test", sClass: "alignCenter","mRender": function (data) {
return '<button type="button" class="btn btn-info btn-md action" id="checkId"><i class="fa fa-dollar fa-fw action"></i></button>'
+ ' <button type="button" class="btn btn-danger btn-md action" id="checkId2" src="Images/TestPicture.png"></button>';
}
Upvotes: 0
Views: 429
Reputation: 563
<button id="imageId type="button"><img src="path/of/image"></button>
Appy css with the help of ID if required
Upvotes: 1
Reputation: 562
You can't give a src
to a button
element. Try to put an <img>
element inside the button:
<button type="button" class="btn btn-danger btn-md action" id="checkId2">
<img src="Images/TestPicture.png"/>
</button>
Upvotes: 1