5
Function I am using:
$(".push-description-top").each(function() {
var text = $(this).text();
var carac = text.length;
if (carac > 0) {
var query = text.split(" ", 14);
query.push('<a href="">... Veja mais!</a>');
res = query.join(' ');
$(this).text(res);
}
});
When pulling text and HTML (<a href="">... Veja mais!</a>
) of the array, HTML is coming as normal text and not in HTML format.
With jQuery I don’t think there’s any other way, and if you have it would be bizarre.
– AnthraxisBR
it happens that it is returning as text element
– Josimara