lib/assets/javascripts/evil-front/ajax.js in evil-front-0.3.4 vs lib/assets/javascripts/evil-front/ajax.js in evil-front-0.3.5

- old
+ new

@@ -1,8 +1,9 @@ //= evil-front/jquery // Change selected form to be sent by AJAX. +// It returns jQuery node of form for chains. // // $('form').evil.ajax // success: -> message('success') // error: (text) -> message('error' + text) // @@ -11,10 +12,10 @@ evil.$.extend('ajax', function (opts) { if ( !opts ) { opts = { }; } - this.submit(function (event) { + return this.submit(function (event) { if ( event.isPropagationStopped() ) { return false; } var form = $(this);