I have some javascript that I'm trying to retool using jQuery to learn the library better and I am running into what seems to be a very elementary problem.
html:
<form id="theForm">
What would you like to do?<br /><br />
<input type="text" id="doThis" /><br /><br />
</form>
js:
$(document).ready(function() {
$("#theForm").submit(function(){
var doThis = $("#doThis").value.toLowerCase();
alert(doThis);
});
});
Can anybody offer some advice as to why this very simple interaction does not seem to work as it should?
Thanks in advance.