PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
← All changes | assets/src/js/utils/iframe-submit.js +27 -27 4.3.9.14.4.8 View file →
@@ -1,27 +1,27 @@
1 -let iframeCounter = 1;
2 -const $ = window.jQuery || jQuery;
3 -
4 -const IframeSubmit = function( form ) {
5 - const iframeId = 'ajax-iframe-' + iframeCounter;
6 - let $iframe = $( 'form[name="' + iframeId + '"]' );
7 -
8 - if ( ! $iframe.length ) {
9 - $iframe = $( '<iframe />' ).appendTo( document.body ).attr( {
10 - name: iframeId,
11 - src: '#',
12 - } );
13 - }
14 -
15 - $( form ).on( 'submit', function() {
16 - const $form = $( form ).clone().appendTo( document.body );
17 -
18 - $form.attr( 'target', iframeId );
19 - $form.find( '#submit' ).remove();
20 -
21 - return false;
22 - } );
23 -
24 - iframeCounter++;
25 -};
26 -
27 -export default IframeSubmit;
1 +let iframeCounter = 1;
2 +const $ = window.jQuery || jQuery;
3 +
4 +const IframeSubmit = function( form ) {
5 + const iframeId = 'ajax-iframe-' + iframeCounter;
6 + let $iframe = $( 'form[name="' + iframeId + '"]' );
7 +
8 + if ( ! $iframe.length ) {
9 + $iframe = $( '<iframe />' ).appendTo( document.body ).attr( {
10 + name: iframeId,
11 + src: '#',
12 + } );
13 + }
14 +
15 + $( form ).on( 'submit', function() {
16 + const $form = $( form ).clone().appendTo( document.body );
17 +
18 + $form.attr( 'target', iframeId );
19 + $form.find( '#submit' ).remove();
20 +
21 + return false;
22 + } );
23 +
24 + iframeCounter++;
25 +};
26 +
27 +export default IframeSubmit;