Problem with substring
I have a series of elements which should appear only in the printed version of the page. Before doing so, though, I need to edit some of them removing some extra chars. This is how I've done it:
If I alert the second command inside the loop I see the correct substring. However, when I preview the printed page, I still see the original string. What am I missing?
$length = $(this).text().length;
Doesn't look like you are setting the value to the substring.
You aren't changing the original string with the edited version.