I am using the following jQuery to allow a user to enter some text into a text field which is then rendered elsewhere on the screen within a div.
I am able to get the text to render in uppercase and lowercase but I'm not too sure how to get it to render in title case, or a mixture of both cases.
This is the code:
jQuery('#fhc-sloganText').keyup(function() {
var plateSlogan = document.getElementById("plateSlogan");
plateSlogan.innerHTML = this.value.toLowerCase();
});
I believe I need to be using RegExp but I'm finding it difficult trying to implement it into this scenario.