NIHVIVO-194 First draft of educational background form. Degree select doesn't get populated, so committing now so BrianC can take a look.

This commit is contained in:
rjy7 2010-04-02 20:15:07 +00:00
parent d3621d8b5b
commit 8f67bb1fb3

View file

@ -3,3 +3,16 @@
String.prototype.capitalize = function() {
return this.substring(0,1).toUpperCase() + this.substring(1);
};
String.prototype.capitalizeWords = function() {
var words = this.split(/\s+/),
wordCount = words.length,
i,
newWords = [];
for (i = 0; i < wordCount; i++) {
newWords.push(words[i].capitalize());
}
return newWords.join(' ');
};