How do I change the case of the fist variable of a string with Jquery
var strTest = "txtHome"
how do I change it to "TxtHome"?
// Your original string var strTest = "txtHome"; // Capitalize it var capitalized = strTest.toUpperCase() + strTest.slice(1);
You can see a working example of this here.