admin_bar_menu.js
2 years ago
flowbite.min.js
2 years ago
gravity_forms.js
3 years ago
math_captcha.js
3 years ago
metabox.js
2 years ago
nitropackUI.js
2 years ago
np_notices.js
2 years ago
np_safemode.js
2 years ago
np_settings.js
2 years ago
popper.min.js
4 years ago
widgets_ajax.js
3 years ago
math_captcha.js
23 lines
| 1 | jQuery(function($){ |
| 2 | $('.nitropack_math_captcha').each(function() { |
| 3 | var el = $(this); |
| 4 | var endpoint = nitropack_math_captcha_ajax.root + '/nitropack/math_captcha/'; |
| 5 | |
| 6 | $.ajax({ |
| 7 | url: endpoint, |
| 8 | data: { |
| 9 | "form-type": el.attr('data-form-type'), |
| 10 | }, |
| 11 | cache: false, |
| 12 | method: 'GET', |
| 13 | dataType: 'json', |
| 14 | beforeSend: function(xhr){ |
| 15 | xhr.setRequestHeader( 'X-WP-Nonce', nitropack_math_captcha_ajax.nonce ); |
| 16 | } |
| 17 | }).done(function(response){ |
| 18 | if (response.code == 'ok') { |
| 19 | el.html(response.html); |
| 20 | } |
| 21 | }); |
| 22 | }); |
| 23 | }); |