PATH:
home
/
lab2454c
/
isaaclondston.com
/
wp-content
/
themes
/
divine_saint
/
inc
/
assets
/
js
jQuery(document).ready(function ($) { "use strict"; $("#nav-item").click(function () { // Remove active if this does not have active class if (!($(this).closest("nav-item").hasClass("active"))) { $(this).closest("#nav-item").find("active").removeClass('active'); } $(this).closest("nav-item").addClass('selected'); }); $('.hamburger-menu').on('click', function () { $('.bar').toggleClass('animate'); }) // $('.dropdown-menu > li > .dropdown-menu').parent().addClass('dropdown-submenu').find(' > .dropdown-item').attr('href', 'javascript:;').addClass('dropdown-toggle'); // $('.dropdown-submenu > a').on("click", function(e) { // var dropdown = $(this).parent().find(' > .show'); // $('.dropdown-submenu .dropdown-menu').not(dropdown).removeClass('show'); // $(this).next('.dropdown-menu').toggleClass('show'); // e.stopPropagation(); // }); // $('.dropdown').on("hidden.bs.dropdown", function() { // $('.dropdown-menu.show').removeClass('show'); // }); $('.dropdown-menu > li > .dropdown-menu').parent().addClass('dropdown-submenu').find(' > .dropdown-item').addClass('dropdown-toggle'); $('.dropdown-submenu > a').on("click", function (e) { if (!$(this).next().hasClass('show')) { $(this).parents('.dropdown-menu').first().find('.show').removeClass('show'); } var $subMenu = $(this).next('.dropdown-menu'); $subMenu.toggleClass('show'); $(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function (e) { $('.dropdown-submenu .show').removeClass('show'); }); return false; }); $('.dropdown-item').click(function () { $('.dropdown-item').removeClass('dropdown__item__show') $(this).addClass('dropdown__item__show'); }); if ($(window).width() > 769) { $('.navbar .dropdown').hover(function () { $(this).find('.dropdown-menu').first().stop(true, true).delay(250).slideDown(); }, function () { $(this).find('.dropdown-menu').first().stop(true, true).delay(100).slideUp(); }); $('.navbar .dropdown > a').click(function () { location.href = this.href; }); } // window.onload = () => { // (typeof $.cookie('invite_code') === 'undefined') // && ($(".page-template-template-home").length // || $(".page-template-template-globalgem").length // || $(".page-template-template-service").length // ) && $("#myModal").modal('show') // } // window.onload = () => { // ((typeof $.cookie('invite_code_home') === 'undefined' // && ilScriptVars.current_template == 'template-home') // || (typeof $.cookie('invite_code_inner') === 'undefined' // && (ilScriptVars.current_template == 'template-globalgem' // || ilScriptVars.current_template == 'template-service' ))) && $("#myModal").modal('show') // } window.onload = () => { ((typeof $.cookie('invite_code_inner') === 'undefined' && (ilScriptVars.current_template == 'template-globalgem' || ilScriptVars.current_template == 'template-service' || ilScriptVars.current_template == 'woocommerce/archive-product' ))) && $("#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: '/' }); if(ilScriptVars.current_template == 'template-home'){ $.cookie("invite_code_home", 1, { expires: 7, path: '/' }); }else{ $.cookie("invite_code_inner", 1, { expires: 7, path: '/' }); } $("#myModal").modal('hide'); } else { alert(response); // window.onload = () => { // $("#myModal").modal('show'); // } } }, 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; }); // For some pages // window.onload = () => { // (typeof $.cookie('invite_code_page') === 'undefined') && $("#myModalPage").modal('show') // } // $( 'form[name="invite_codes_page"]' ).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_page",1, { expires: 7, path: '/' }); // $("#myModalPage").modal('hide'); // }else{ // alert( response ); // // window.onload = () => { // // $("#myModalPage").modal('show'); // // } // } // }, // 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; // }); });
[+]
..
[-] script.js
[edit]
[-] scripts.js
[edit]
[-] main.js
[edit]
[-] owl.carousel.js
[edit]