diff --git a/README.textile b/README.textile index 8e70ce7..ddab36f 100644 --- a/README.textile +++ b/README.textile @@ -1,5 +1,9 @@ h3. Changelog +h4. 1.7.2 + +* Submit on change if input type select and no submit button defined ("gregpyp":http://github.com/gregpyp) + h4. 1.7.1 * Namespace default event as click.editable ("Zangetsu":http://github.com/Zangetsu) diff --git a/jquery.jeditable.js b/jquery.jeditable.js index 003000e..d992300 100644 --- a/jquery.jeditable.js +++ b/jquery.jeditable.js @@ -513,6 +513,13 @@ $(this).attr('selected', 'selected'); } }); + /* Submit on change if no submit button defined. */ + if (!settings.submit) { + var form = this; + $('select', this).change(function() { + form.submit(); + }); + } } } },