In a game for school, I want the player to be able to enter answers into a textinput field. However, I don't want capitalization to be a factor.
How can I go about parsing
the variable to upper/lower case?
Right now, I have this in the stylesheet:
input {
text-transform: uppercase;
}
That makes the text the player enters in the field appear in all uppercase, but the actual variable is whatever case the user inputted.
I understand this is the JavaScript needed:
$('input').keyup(function(){
this.value = this.value.toLowerCase();
});
However, I don't know how to use that to change the variable's value. I'm an idiot, I know. ;D
Thanks!
Comments
So do it like this. At the very start of the macro find the params argument and convert that first thing. If you need help I might pop on irc later.
I do recommend using .toLowerCase() for the actual variables: