summaryrefslogtreecommitdiff
path: root/static/js/jquery.submitter.js
blob: 47352ed9c567d3030a9385e9ae6f5e0f7d91531c (plain)
1
2
3
4
5
6
7
8
9
10
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();
        })
    })
};