https://www.stellarservertools.com/blog/wp-content/themes/schema/schema/js/customscript.js?ver=6.5.3
1jQuery.fn.exists = function(callback) { 2 var args = [].slice.call(arguments, 1); 3 if (this.length) { 4 callback.call(this, args); 5 } 6 return this; 7}; 8 9/*---------------------------------------------------- 10/* Scroll to top 11/*--------------------------------------------------*/ 12jQuery(document).ready(function($) { 13 //move-to-top arrow 14 jQuery("body").prepend("<div id='move-to-top' class='animate '><i class='fa fa-angle-double-up'></i></div>"); 15 var scrollDes = 'html,body'; 16 /*Opera does a strange thing if we use 'html' and 'body' together so my solution is to do the UA sniffing thing*/ 17 if(navigator.userAgent.match(/opera/i)){ 18 scrollDes = 'html'; 19 } 20 //show ,hide 21 jQuery(window).scroll(function () { 22 if (jQuery(this).scrollTop() > 160) { 23 jQuery('#move-to-top').addClass('filling').removeClass('hiding'); 24 } else { 25 jQuery('#move-to-top').removeClass('filling').addClass('hiding'); 26 } 27 }); 28 // scroll to top when click 29 jQuery('#move-to-top').click(function () { 30 jQuery(scrollDes).animate({ 31 scrollTop: 0 32 },{ 33 duration :500 34 }); 35 }); 36}); 37 38/*---------------------------------------------------- 39/* Responsive Navigation 40/*--------------------------------------------------*/ 41jQuery(document).ready(function($){ 42 var $top_menu = $('.primary-navigation'); 43 var $secondary_menu = $('.secondary-navigation'); 44 var $first_menu = ''; 45 var $second_menu = ''; 46 47 if ($top_menu.length == 0 && $secondary_menu.length == 0) { 48 return; // no need for further processing 49 } else { 50 if ($top_menu.length) { 51 $first_menu = $top_menu; 52 $second_menu = $secondary_menu; 53 } else { 54 $first_menu = $secondary_menu; 55 } 56 } 57 58 var menu_wrapper = $first_menu 59 .clone().attr('class', 'mobile-menu') 60 .wrap('<div id="mobile-menu-wrapper"></div>').parent().hide() 61 .appendTo('body'); 62 63 // add items from the other menu 64 if ($second_menu.length) { 65 $second_menu.find('li').clone().prependTo('.mobile-menu .menu'); 66 } 67 68 $('.toggle-mobile-menu').click(function(e) { 69 e.preventDefault(); e.stopPropagation(); 70 $('#mobile-menu-wrapper').show(); // only required once 71 $('body').toggleClass('mobile-menu-active'); 72 }); 73 74 // close menu when click/tap on content 75 $('#mobile-menu-wrapper').click(function(e) { 76 e.stopPropagation(); 77 }); 78 $(document).click(function() { 79 if ($('body').hasClass('mobile-menu-active')) { 80 $('body').removeClass('mobile-menu-active'); 81 } 82 }); 83}); 84 85/*---------------------------------------------------- 86/* Dropdown menu 87/* ------------------------------------------------- */ 88jQuery(document).ready(function($) { 89 $('#navigation ul.sub-menu, #navigation ul.children').hide(); // hides the submenus in mobile menu too 90 $('#navigation li').hover( 91 function() { 92 $(this).children('ul.sub-menu, ul.children').slideDown('fast'); 93 }, 94 function() { 95 $(this).children('ul.sub-menu, ul.children').hide(); 96 } 97 ); 98}); 99 100/*---------------------------------------------------- 101/* Social button scripts 102/*---------------------------------------------------*/ 103jQuery(document).ready(function($){ 104 (function(d, s) { 105 var js, fjs = d.getElementsByTagName(s)[0], load = function(url, id) { 106 if (d.getElementById(id)) {return;} 107 js = d.createElement(s); js.src = url; js.id = id; 108 fjs.parentNode.insertBefore(js, fjs); 109 }; 110 jQuery('span.facebookbtn, .fb-like-box').exists(function() { 111 load('//connect.facebook.net/en_US/all.js#xfbml=1', 'fbjssdk'); 112 }); 113 jQuery('span.gplusbtn').exists(function() { 114 load('https://apis.google.com/js/plusone.js', 'gplus1js'); 115 }); 116 jQuery('span.twitterbtn').exists(function() { 117 load('//platform.twitter.com/widgets.js', 'tweetjs'); 118 }); 119 jQuery('span.linkedinbtn').exists(function() { 120 load('//platform.linkedin.com/in.js', 'linkedinjs'); 121 }); 122 jQuery('span.pinbtn').exists(function() { 123 load('//assets.pinterest.com/js/pinit.js', 'pinterestjs'); 124 }); 125 jQuery('span.stumblebtn').exists(function() { 126 load('//platform.stumbleupon.com/1/widgets.js', 'stumbleuponjs'); 127 }); 128 }(document, 'script')); 129});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.