Can this be achieved using jQuery? For example declare an string array that holds the characters i want to target and write some code to update these?
Using the following jQuery it will target the word package in any h3’s site wide, apply the span class font-fix and update the word to say test
$('h3').each(function () { $(this).html( $(this).html().replace(‘package’, '<span class=\'font-fix\'>test</span>') ); });
However when I attempt to target the £ sign or any other special char it doesn’t seem to work.
$('h3').each(function () { $(this).html( $(this).html().replace(‘£’, '<span class=\'font-fix\'>£</span>') ); });
Can anyone tell me what I’m doing wrong please? – Id like to be able to target all heading tags and paragraph tags replacing the special characters
Many thanks
Paul