PHP Classes

File: lib/js/scripts.min.js

Recommend this page to a friend!
  Classes of Joko Prasetyo   kciaotime WordPress Theme   lib/js/scripts.min.js   Download  
File: lib/js/scripts.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: kciaotime WordPress Theme
WordPress theme to customize different page parts
Author: By
Last change:
Date: 1 year ago
Size: 2,234 bytes
 

Contents

Class file image Download
/** * Main Scripts File * @author: Rachel Baker * * Place any jQuery/helper plugins in here. * * This file will be called automatically in the footer so as not to slow the page load. **/jQuery(document).ready(function($) { function WidthChange(mq) { if (mq.matches) { $("#site-navigation .menu").horizontalNav({}); $("#site-navigation .menu").show(); } else $("#site-navigation .menu").hide(); } $("#site-navigation .menu").Touchdown(); if (matchMedia) { var mq = window.matchMedia("(min-width: 769px)"); mq.addListener(WidthChange); WidthChange(mq); } window.jQuery; }); (function(w){ // This fix addresses an iOS bug, so return early if the UA claims it's something else. var ua = navigator.userAgent; if( !( /iPhone|iPad|iPod/.test( navigator.platform ) && /OS [1-5]_[0-9_]* like Mac OS X/i.test(ua) && ua.indexOf( "AppleWebKit" ) > -1 ) ){ return; } var doc = w.document; if( !doc.querySelector ){ return; } var meta = doc.querySelector( "meta[name=viewport]" ), initialContent = meta && meta.getAttribute( "content" ), disabledZoom = initialContent + ",maximum-scale=1", enabledZoom = initialContent + ",maximum-scale=10", enabled = true, x, y, z, aig; if( !meta ){ return; } function restoreZoom(){ meta.setAttribute( "content", enabledZoom ); enabled = true; } function disableZoom(){ meta.setAttribute( "content", disabledZoom ); enabled = false; } function checkTilt( e ){ aig = e.accelerationIncludingGravity; x = Math.abs( aig.x ); y = Math.abs( aig.y ); z = Math.abs( aig.z ); // If portrait orientation and in one of the danger zones if( (!w.orientation || w.orientation === 180) && ( x > 7 || ( ( z > 6 && y < 8 || z < 8 && y > 6 ) && x > 5 ) ) ){ if( enabled ){ disableZoom(); } } else if( !enabled ){ restoreZoom(); } } w.addEventListener( "orientationchange", restoreZoom, false ); w.addEventListener( "devicemotion", checkTilt, false ); })( this );