<p>In jQuery, if I assign <code>class=auto_submit_form</code> to a form, it will be submitted whenever any element is changed, with the following code:</p>

<pre><code>/* automatically submit if any element in the form changes */
$(function() {
  $(".auto_submit_form").change(function() {
    this.submit();
  });
});
</code></pre>

<p>However, if I want to the form to submit only when specified elements are changed:</p>

<pre><code>/* submit if elements of class=auto_submit_item in the form changes */
$(function() {
  $(".auto_submit_item").change(function() {
    $(this).parents().filter("form").submit();
  });
});
</code></pre>

<p>I'm just learning jQuery. Is there a better way to do this?</p>

```
```
/* submit if elements of class=auto_submit_item in the form changes */
$(function() {
   $(".auto_submit_item").change(function() {
     $("form").submit();
   });
 });
```
```
Assumes you only have one form on the page.  If not, you'll need to do select the form that is an ancestor of the current element using
```
$(this).parents("form").submit()
```