Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hello, you just need to modify the .js that makes the work around with this code:

    $.post(dot_irecommendthis.ajaxurl, { action:’dot-irecommendthis’, recommend_id:id, suffix:suffix }, function(data){
    link.html(“”).addClass(‘active’).attr(‘title’,’You already recommended this’);
    link.append(‘<i class=”fa fa-heart” aria-hidden=”true”></i>’);
    link.append(‘<span class=”dot-irecommendthis-count”>’+data+'</span>’);
    link.append(‘<span class=”dot-irecommendthis-suffix”></span>’);
    });

    what was happening?
    The old code was overwriting the content on the appended link element with the link.html(data), so you just need to clear it at the beggining and generate it again withe the appends I’ve posted

    Regards

Viewing 1 replies (of 1 total)