I'm in the process of learning jQuery and feel that I must be missing something. I have a super simple form set up as below:
<form name="testform" id="testform" method="post">
<select type="select" id="searchid">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
</select>
<input type="text" id="searchtext" value="$_POST['value']">
</form>
I'd like to use jQuery to automatically submit the form when #searchid is changed. I understand how to do this with basic JavaScript, but I need jQuery for other things and need to learn how these things work. The below jQuery snippet seems to me like it should work, but it's not working. Any ideas why?
$( "#searchid" ).change( function() {
$( "#testform" ).submit();
})