|
|
|
|
|
by jQueryIsAwesome
4845 days ago
|
|
The thing is to avoid overlapping with other elements, if they want to ruin their own description/comment so be it. But just for the technical challenge you could do something like this in Javascript to chop every individual special character: string.split("").map(function(a){
return /[a-z0-9\s]/i.test(a) ? a : '<span class="s_char">' + a + '</span>';
}).join("");
And apply the mentioned CSS to the "s_char" class. |
|