PATH:
home
/
lab2454c
/
nfsin.com
/
wp-content
/
themes
/
igsin
/
inc
/
assets
/
js
$(document).ready(function () { window.onload = () => { (typeof $.cookie('invite_code') === 'undefined') && $("#myModal").modal('show') } $( 'form[name="invite_codes"]' ).on( 'submit', function() { var form_data = $( this ).serializeArray(); // Here we add our nonce (The one we created on our functions.php. WordPress needs this code to verify if the request comes from a valid source. form_data.push( { "name" : "security", "value" : ajax_nonce } ); // Here is the ajax petition. $.ajax({ url : ajax_url, // Here goes our WordPress AJAX endpoint. type : 'post', data : form_data, success : function( response ) { if(response == 'success'){ // You can craft something here to handle the message return $.cookie("invite_code",1, { expires: 7, path: '/' }); $("#myModal").modal('hide'); }else{ alert( response ); } }, fail : function( err ) { // You can craft something here to handle an error if something goes wrong when doing the AJAX request. alert( "There was an error: " + err ); } }); // This return prevents the submit event to refresh the page. return false; }); }); function fadeOut(el) { if(typeof el != 'undefined' && el != null){ el.style.opacity = 1 (function fade() { if ((el.style.opacity -= .1) < 0) { el.style.display = "none" } else { requestAnimationFrame(fade) } })() } }; function fadeIn(el, display) { if(typeof el != 'undefined' && el != null){ el.style.opacity = 0, el.style.display = display || "block", (function fade() { var val = parseFloat(el.style.opacity) if (!((val += .1) > 1)) { el.style.opacity = val requestAnimationFrame(fade) } })() } };
[+]
..
[-] script.js
[edit]
[-] .htaccess
[edit]
[-] main.js
[edit]
[-] owl.carousel.js
[edit]