Looking to give my site title a unique font separate from the rest of the content every time it appears in a heading. This is all for branding purposes. Let's say my custom font is Courier and my company goes by the name SparklePony. For example, if there was a line like,
<h1 class="title">SparklePony Board of Directors</h1>
the word SparklePony would be styled in Courier while the rest of the heading remains in Arial, the default font of my site. (I understand this combination may not look the best.)
I've attempted using jQuery string replacement but I don't want to actually replace the string entirely – instead, I just want to see that specific word in Courier by adding a class or something similar. Whenever I tried replacing SparklePony
with
<span class="sparkle-pony">SparklePony</span>
, the whole messy string with tags displayed on my site without effectively adding the desired class.
Is there an error in how I'm implementing my string replace, or perhaps there's a more effective method to style every instance of a particular string?