This file contains 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
// store the element for later | |
// element === '<div>$9.99 USD/month</div>' | |
var $el = $(element); | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace | |
// http://regexr.com/3h2rl | |
var newText = $el.text().replace('/\/month/', '<span>/month</span>'); | |
// set the element to use the next text | |
$el.text(newText); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment