Superscript All ® Trademark Characters
Automatically superscript all ® Trademark Characters on your Webflow site. Adding this Javascript and CSS allows your Webflow site to automatically superscript all ® trademark symbols on your Webflow site.
Automatically superscript all ® Trademark Characters on your Webflow site. Adding this Javascript and CSS allows your Webflow site to automatically superscript all ® trademark symbols on your Webflow site.
How to add it
- Add the CSS to your pages head custom code section
- Add the Javascript to your pages body custom code section
The code
Javascript
<!-- Add to closing body section -->
<script>
$('body :not(script,sup)').contents().filter(function() {
return this.nodeType === 3;
}).replaceWith(function() {
return this.nodeValue.replace(/[™®©]/g, '<sup>$&</sup>');
});
</script>
CSS
<!-- Add to head section -->
/*Style <sup> all elements*/
sup {
position: relative;
top: -0.5em;
font-size: 60%;
}