How to replace with font awesome
Page 1 of 1
How to replace with font awesome
I'd really like to replace this heart image with font awesome, but I don't know how.
I'd like to add this:
Instead of this:
Can somebody send me the fix to this code to make it work properly, thanks.
- Code:
function VLIKE(b,a){
a.onclick="#";
$.get(b,function(){
a.parentNode.style.display='none';
a.parentNode.nextSibling.firstChild.className='positive';
var c=a.parentNode.nextSibling.firstChild,
b=parseInt(/\d+/.exec(c.innerHTML)[0])+1;
c.innerHTML=c.innerHTML.replace(/\d+/,b);
}
)};
$(function(){
var x = $('.vote').get();
for(i = x.length-1; i >= 0; i--){
var numb = '0';
var reputation_UP = 'http://twemoji.maxcdn.com/72x72/2764.png';
var button = $(x[i]).find('.vote-button a').get();
for(j=0; j < button.length; j++){
if(button[j].innerHTML == '+'){
reputation_UP = '<span onclick="VLIKE(\'' + button[j].href + '\',this);"><img src="'+reputation_UP+'" alt="+" class="rep_up"></span>';
}
}
var bar = $(x[i]).find('.vote-bar')[0];
if(bar){
var s = bar.title.split(' ');
var pct = parseInt(s[3].replace(/%/,''))/100;
var num = parseInt(s[4].replace(/\(/,''));
numb = String(Math.round(num*pct));
reputation_UP = '<img src="'+reputation_UP+'" alt="+" class="rep_up">';
}
var votetext = numb;
var Html = '<div class="rep_bar clearfix" id="rep_post">
<ul class="bs_inline">
<li>'+reputation_UP+'</li>
<li><span id="reput_vote">'+votetext+'</span></li>
</ul>
</div>';
$(x[i].parentNode.parentNode.parentNode.parentNode).find('.postfoot').before(Html);
if(!bar){
$(x[i].parentNode.parentNode.parentNode.parentNode).find('#reput_vote').addClass('zero');
}else{
$(x[i].parentNode.parentNode.parentNode.parentNode).find('#reput_vote').addClass('positive');
$(x[i].parentNode.parentNode.parentNode.parentNode).find('.rep_up').parents('li').css({"display":"none"});
}
x[i].parentNode.removeChild(x[i]);
}
});
I'd like to add this:
- Code:
<font size="3px"><font color="red"><i class="fa fa-heart" aria-hidden="true"></i></font>
Instead of this:
- Code:
var reputation_UP = 'http://twemoji.maxcdn.com/72x72/2764.png';
Can somebody send me the fix to this code to make it work properly, thanks.
Guest- Guest
Re: How to replace with font awesome
hello
change this
with this
change this
- Code:
var reputation_UP = 'http://twemoji.maxcdn.com/72x72/2764.png';
with this
- Code:
var reputation_UP = 'https://i37.servimg.com/u/f37/11/40/02/06/1235.png';
Similar topics
» Font Awesome in the editor
» How to install and use Font Awesome
» In order to install and use Font Awesome icons
» Font Awesome (Icons)
» Font Awesome Update
» How to install and use Font Awesome
» In order to install and use Font Awesome icons
» Font Awesome (Icons)
» Font Awesome Update
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum