Created
September 7, 2018 10:29
-
-
Save Farmatique/c8a0c03e32814ce4abe7eb43efd0deac to your computer and use it in GitHub Desktop.
Wrap first letter in a word
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('p').html(function(i, html){ | |
return html.replace(/^[^a-zA-Z]*([a-zA-Z])/g, '<span class="first-letter">$1</span>'); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment