function(response) {
if(1 == response) {
if(type=='favorite'){
thelink.text('<?php _e('Rem Portfolio', 'sp-favorite-groups'); ?>');
thelink.addClass('unfavorite-group').removeClass('favorite-group');
} else {
thelink.text('<i class="icon-bell"></i><?php _e('Add Portfolio', 'sp-favorite-groups'); ?>');
thelink.addClass('favorite-group').removeClass('unfavorite-group');
}
} else {
alert(response);
}
}
I have a function/plugin that changes the text inside a button. How do I include icon to the text? Eg
thelink.text('<i class="icon-bell"></i><?php _e('Rem Portfolio', 'sp-favorite-groups'); ?>');
Obviously that doesnt work as the browser shows all the html tags instead of the actual icon.