diff options
Diffstat (limited to 'static/js')
-rw-r--r-- | static/js/jquery.submitter.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/static/js/jquery.submitter.js b/static/js/jquery.submitter.js new file mode 100644 index 0000000..47352ed --- /dev/null +++ b/static/js/jquery.submitter.js @@ -0,0 +1,11 @@ +jQuery.fn.submitter = function() { + this.each(function() { + var that = $(this); + that.click(function(ev) { + ev.preventDefault(); + var form = $(that.attr('data-form')); + form.attr('action',that.attr('href')); + form.submit(); + }) + }) +};
\ No newline at end of file |