We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c3a0f3c + ed73a01 commit 0fd0230Copy full SHA for 0fd0230
themes/loop/loop.info
@@ -16,6 +16,7 @@ scripts[] = scripts/modernizr.min.js
16
scripts[] = scripts/chosen.jquery.js
17
scripts[] = scripts/use-chosen.min.js
18
scripts[] = scripts/toggle.js
19
+scripts[] = scripts/form.js
20
21
; Stylesheets
22
stylesheets[all][] = css/styles.css
themes/loop/scripts/form.js
@@ -0,0 +1,11 @@
1
+(function($) {
2
+ $(function () {
3
+ // Disable all submit buttons on submit to prevent multiple
4
+ // submits.
5
+ // Using the "submit" event on the form is too slow (late), so we
6
+ // use the "click" event on the button itself.
7
+ $('form [type="submit"]').on('click', function() {
8
+ $(this).closest('form').find('[type="submit"]').prop('disabled', true);
9
+ });
10
11
+})(jQuery);
0 commit comments