healingpicks.com
Open in
urlscan Pro
3.66.136.156
Public Scan
Submitted URL: http://healingpicks.com/wp-content/themes/amphibious/js/custom.js?ver=1.0
Effective URL: https://healingpicks.com/wp-content/themes/amphibious/js/custom.js?ver=1.0
Submission: On December 28 via manual from SG — Scanned from DE
Effective URL: https://healingpicks.com/wp-content/themes/amphibious/js/custom.js?ver=1.0
Submission: On December 28 via manual from SG — Scanned from DE
Form analysis
0 forms found in the DOMText Content
/*! * Custom v1.0 * Contains handlers for the different site functions * * Copyright (c) 2019 TemplatePocket.com * License: GNU General Public License v2 or later * http://www.gnu.org/licenses/gpl-2.0.html */(function($){var amphibious={responsiveMenuBuild:function(){var $menuWrapper=$('.site-header-menu-wrapper');$('.site-header-menu .page_item_has_children > a, .site-header-menu .menu-item-has-children > a').append('<button class="dropdown-toggle" aria-expanded="false"/>');$('.site-header-menu .dropdown-toggle').off('click').on('click',function(e){e.preventDefault();$(this).toggleClass('toggle-on');$(this).parent().next('.children, .sub-menu').toggleClass('toggle-on');$(this).attr('aria-expanded',$(this).attr('aria-expanded')==='false'?'true':'false');});$menuWrapper.prepend('<div class="site-header-menu-responsive-close-wrapper"><button class="site-header-menu-responsive-close">×</button></div>');},responsiveMenuDestroy:function(){var $menuWrapper=$('.site-header-menu-wrapper');$menuWrapper.find('.dropdown-toggle').remove();$menuWrapper.find('.site-header-menu-responsive-close-wrapper').remove();},sfMenuBuild:function(){$('ul.sf-menu').superfish({delay:1500,animation:{opacity:'show',height:'show'},speed:'fast',autoArrows:false,cssArrows:true,});},sfMenuDestroy:function(){$('ul.sf-menu').superfish('destroy');},bigScreenMatch:function(){var $menuWrapper=$('.site-header-menu-wrapper');$menuWrapper.removeClass('site-header-menu-responsive-wrapper');var $menu=$('.site-header-menu');$menu.removeClass('site-header-menu-responsive');$menu.addClass('sf-menu');amphibious.sfMenuBuild();},bigScreenUnMatch:function(){amphibious.sfMenuDestroy();var $menu=$('.site-header-menu');$menu.addClass('site-header-menu-responsive');$menu.removeClass('sf-menu');var $menuWrapper=$('.site-header-menu-wrapper');$menuWrapper.addClass('site-header-menu-responsive-wrapper');},smallScreenMatch:function(){amphibious.responsiveMenuBuild();amphibious.slidePanelInit();$('.entry-content, .sidebar').find('table').wrap('<div class="table-responsive"></div>');},smallScreenUnMatch:function(){amphibious.responsiveMenuDestroy();amphibious.slidePanelCloseInit();$('.entry-content, .sidebar').find('table').unwrap('<div class="table-responsive"></div>');},slidePanelInit:function(){var $menuWrapper=$('.site-header-menu-wrapper');var $overlayEffect=$('.overlay-effect');var $menuClose=$('.site-header-menu-responsive-close');$('.toggle-menu-control').off('click').on('click',function(e){e.preventDefault();e.stopPropagation();$menuWrapper.toggleClass('show');$overlayEffect.toggleClass('open');if($overlayEffect.hasClass('open')){$('body').addClass('has-responsive-menu');amphibious.responsiveMenuFocus();setTimeout(function(){$('.site-header-menu-responsive-close').focus();},300);}});$menuClose.off('click').on('click',function(e){e.preventDefault();e.stopPropagation();amphibious.slidePanelCloseInit();});$overlayEffect.off('click').on('click',function(){amphibious.slidePanelCloseInit();});},slidePanelCloseInit:function(){var $menuWrapper=$('.site-header-menu-wrapper');var $overlayEffect=$('.overlay-effect');if($overlayEffect.hasClass('open')){$('body').removeClass('has-responsive-menu');if($menuWrapper.hasClass('show')){$menuWrapper.toggleClass('show');} $overlayEffect.toggleClass('open');setTimeout(function(){$('.toggle-menu-control').focus();},300);}},responsiveMenuFocus:function(){$(document).on('keydown',function(e){var selectorWrapper='.site-header-menu-wrapper';var selectorCloseButton=selectorWrapper+' > div > button';var selectorParentAnchors=selectorWrapper+' > ul > li > a';var selectorParentToggles=selectorWrapper+' > ul > li > a > button';var selectorChildAnchors=selectorWrapper+' > ul > li ul.sub-menu.toggle-on > li > a';var selectorChildToggles=selectorWrapper+' > ul > li ul.sub-menu.toggle-on > li > a > button';var selector=selectorCloseButton+','+selectorParentAnchors+','+selectorParentToggles+','+selectorChildAnchors+','+selectorChildToggles;var $elements=$(selector);var elementsArray=Array.prototype.slice.call($elements);var $lastElement=elementsArray[elementsArray.length-1];var $firstElement=elementsArray[0];var $focusedElement=$(':focus')[0];tabKey=e.keyCode===9;shiftKey=e.shiftKey;if(!shiftKey&&tabKey&&$lastElement==$focusedElement){e.preventDefault();$firstElement.focus();} if(shiftKey&&tabKey&&$firstElement==$focusedElement){e.preventDefault();$lastElement.focus();}});},responsiveVideosInit:function(){$('.entry-content, .sidebar').fitVids();},widgetLogicInit:function(){$('.widget_nav_menu > div[class^="menu-social-"] > ul > li > a').wrapInner('<span class="screen-reader-text"></span>');$('.widget_nav_menu .menu-item-has-children > a').append('<span class="custom-menu-toggle" aria-expanded="false"></span>');$('.widget_nav_menu .custom-menu-toggle').off('click').on('click',function(e){e.preventDefault();$(this).toggleClass('toggle-on');$(this).parent().next('.sub-menu').toggleClass('toggle-on');$(this).attr('aria-expanded',$(this).attr('aria-expanded')==='false'?'true':'false');});$('.widget_pages .page_item_has_children > a').append('<span class="page-toggle" aria-expanded="false"></span>');$('.widget_pages .page-toggle').off('click').on('click',function(e){e.preventDefault();$(this).toggleClass('toggle-on');$(this).parent().next('.children').toggleClass('toggle-on');$(this).attr('aria-expanded',$(this).attr('aria-expanded')==='false'?'true':'false');});$('.widget_categories').find('.children').parent().addClass('category_item_has_children');$('.widget_categories .category_item_has_children > a').append('<span class="category-toggle" aria-expanded="false"></span>');$('.widget_categories .category-toggle').off('click').on('click',function(e){e.preventDefault();$(this).toggleClass('toggle-on');$(this).parent().next('.children').toggleClass('toggle-on');$(this).attr('aria-expanded',$(this).attr('aria-expanded')==='false'?'true':'false');});},mqInit:function(){enquire.register('screen and ( min-width: 992px )',{match(){amphibious.bigScreenMatch();},unmatch(){amphibious.bigScreenUnMatch();},}).register('screen and ( max-width: 991px )',{match(){amphibious.smallScreenMatch();},unmatch(){amphibious.smallScreenUnMatch();},});},};$(document).ready(function(){amphibious.responsiveVideosInit();amphibious.widgetLogicInit();amphibious.mqInit();});$(document).keyup(function(e){if(e.keyCode===27){amphibious.slidePanelCloseInit();}});}(jQuery));