jQuery(document).ready( function($){$('#lnkfav').on("click", ".wpfp-link", function(e) {e.preventDefault();var type = $(this).data( "type" );var id = $(this).data( "id" );if(type=='remove'){var type_f = 'add';var classfav = 'fa-heart mtfav-add';var textfav = MtFav.txt_add;}if(type=="add"){var type_f = 'remove';var classfav = 'fa-times-circle mtfav-remove';var textfav = MtFav.txt_remove;}$('#lnkfav .wpfp-span').html('<a data-type="'+type_f+'" data-tp="1" class="wpfp-link wpfp-linkmt ictxt '+classfav+'" href="?wpfpaction='+type_f+'&amp;postid='+id+'" title="'+textfav+'" rel="nofollow"></a>');});});