In jQuery, if I assign the form class=auto_submit_form form, it will be sent whenever any element is changed, with the following code:
$(function() { $(".auto_submit_form").change(function() { this.submit(); }); });
However, if I want the form to be submitted only when the specified elements change:
$(function() { $(".auto_submit_item").change(function() { $(this).parents().filter("form").submit(); }); });
I am just learning jQuery. Is there a better way to do this?
javascript jquery
Jeff bauer
source share