Created
April 30, 2014 16:08
-
-
Save EvanHahn/51b35166bfe77694d317 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var iframesLoaded = 0; | |
$("form").each(function() { | |
var $form = $(this); | |
var $iframe = $("<iframe name='temporary-iframe'></iframe>"); | |
var oldTarget = $form.prop("target"); | |
$form.prop("target", "temporary-iframe"); | |
$iframe.hide(); | |
$("body").append($iframe); | |
$iframe.on("load", function() { | |
iframesLoaded += 1; | |
// update loading bar based on this? | |
$iframe.remove(); | |
}); | |
$form.submit(); | |
$form.prop("target", oldTarget); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment