After implementing the jQuery .html function, I noticed a strange change in the font of the div. Can anyone help me identify why this is happening? Is there an error in my code?
Your assistance is greatly appreciated.
$.ajax({
type: "POST",
url: '/_backend/forum/like_post.php',
data: 'postID=' + postID,
success: function(data){
$(".btn-like-post[data-post-id='" + postID + "']").html( "<i class='fa fa-heart'> Liked (" + likedByNow + ")" );
$(".btn-like-post[data-post-id='" + postID + "']").attr("class", "btn btn-dark-pink");
$(".btn-like-post[data-post-id='" + postID + "']").attr("title", data );
}
});
UPDATE
Before:
After: http://prntscr.com/g2r5jx
UPDATE
CSS Styles
.btn-dark-pink, .btn-dark-pink:hover, .btn-dark-pink:focus {
background: #c43063;
color: white;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}
.btn-pink, .btn-pink:hover, .btn-pink:focus {
background: #f94a86;
color: white;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}