PageSourceSearch

https://margaretatwood.ca/wp-content/themes/simplify-extend/js/menu.js?ver=7.1.2

js margaretatwood.ca collected 2026-09-24 18:05:37 UTC 4,834 bytes, 102 lines download raw bytes

1jQuery(document).ready(function(){ 'use strict'; jQuery("#main-menu-con ul ul").css({display: "none"}); jQuery('#main-menu-con ul li').hover( function() { jQuery(this).find('ul:first').slideDown(300).css('visibility', 'visible');  }, function() { jQuery(this).find('ul:first').slideUp(100); });
2
3jQuery('#mobile-menu').click(function(){ jQuery('#main-menu-con').toggle(); });				  
4jQuery('#footer .social a').css('color',jQuery('#footer .social').css('background-color'));								  
5jQuery('#respond .comment-form-author, #respond .comment-form-email, #respond .comment-form-url').addClass('flexboxitem');  
6});
7
8jQuery(window).on("load resize", function () { 	'use strict';
9	var reswidth = jQuery('#resmeasure').width();										  
10	var searchloginHeight = jQuery("#searchloginbar").outerHeight(true);
11	var searchloginnormaltop = 16 - searchloginHeight;
12	jQuery('#searchloginbar').css({top: (searchloginnormaltop)+'px'});	
13	
14	if ( reswidth < 9 ) { 
15		if ( jQuery(".mmenucon").parent().attr("id") === "mmainmenu") { jQuery( ".mmenucon" ).unwrap(); }
16		jQuery( ".mmenucon" ).wrapAll( "<div id='mmainmenu' />");
17		jQuery('#main-menu-con').hide();
18	} 
19	else { 
20		if ( jQuery(".mmenucon").parent().attr("id") === "mmainmenu") { jQuery( ".mmenucon" ).unwrap(); }
21		jQuery('#main-menu-con').show();
22		jQuery('#mobile-menu').removeClass('yesclick');		 
23	}
24											  
25	if ( jQuery('ul.lboxd')[0] && jQuery('ul.lboxd').offset().left < 230 ) { var ullboxleft = jQuery('ul.lboxd').offset().left;			jQuery("ul.lboxd ul").css({left: '-'+ullboxleft+'px', right:'auto'});  }									  
26	
27});
28
29jQuery(window).on("load resize", function () { 	'use strict';
30jQuery(".menu-item-has-children, .page_item_has_children").on('mouseenter mouseleave', function () { 
31        if (jQuery('ul', this).length) {
32            var elm = jQuery('ul:first', this);
33            var off = elm.offset();
34            var l = off.left;
35            var w = elm.width();
36            var docW = jQuery("#site-container").width();
37			var t = jQuery("#site-container").offset().left;
38            var isEntirelyVisible = (l + w <= docW + t);
39            if (!isEntirelyVisible) {
40                jQuery(this).addClass('smedge');
41            } else {
42                jQuery(this).removeClass('smedge');
43            }
44        }
45    });					   
46});
47
48// MP4 HTML5 Video
49
50var mp4FullScreen = function(elem){ 'use strict';	
51	if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) {		
52		var fullscreen = elem.requestFullscreen || elem.webkitRequestFullscreen || elem.mozRequestFullScreen || elem.msRequestFullscreen;
53		fullscreen.call(elem); // bind the 'this' from the video object and instantiate the correct fullscreen method.
54	} else {
55		var exitfullscreen = document.exitFullscreen || document.webkitCancelFullScreen || document.mozCancelFullScreen || document.msExitFullscreen;
56		exitfullscreen.call(document); // bind the 'this' from the video object and instantiate the correct fullscreen method.
57	}
58};
59
60jQuery(document).ready(function(){ 'use strict';
61	jQuery( '.mp4vidbox' ).append( '<div class="playpause"></div><div class="vidfullscreen"></div>' );								  
62	jQuery('.mp4vidbox video').parent().click(function () {
63		if(jQuery(this).children("video").get(0).paused){ 
64			jQuery(this).children("video").get(0).play();   
65			// jQuery(this).children(".playpause").fadeOut().addClass('playrunning');
66			jQuery(this).children(".playpause").addClass('playrunning');
67		} else {
68			jQuery(this).children("video").get(0).pause();
69			// jQuery(this).children(".playpause").fadeIn();
70			jQuery(this).children(".playpause").removeClass('playrunning');
71		}
72	});		
73				  
74	jQuery('.mp4vidbox video').parent().dblclick(function () {	
75		var elem = jQuery(this).children('video')[0];
76		mp4FullScreen(elem);
77	});	
78								  
79	jQuery('.vidfullscreen').click(function () {	
80		var elem = jQuery(this).parent().children('video')[0];
81		mp4FullScreen(elem);
82		elem[elem.paused ? 'play' : 'pause']();
83	});	
84
85	var i = null;
86	jQuery('.mp4vidbox').mousemove(function() {
87		clearTimeout(i);
88		jQuery('.playrunning').css({ opacity: 0.7 });
89		i = setTimeout(function(){jQuery('.playrunning').css({ opacity: 0 });}, 3000);
90	}).mouseleave(function() {
91		clearTimeout(i);
92		jQuery('.playrunning').css({ opacity: 0 }); 
93	});
94});
95
96jQuery(window).on("load resize", function () { 	'use strict';
97	jQuery('.mp4vidbox video').each(function () {	
98		var vidboxWidth = jQuery(this).width();
99		var playfontsize = vidboxWidth*0.15;
100		if ( playfontsize > 55 ) { jQuery(this).siblings('.playpause').css({fontSize: (playfontsize)+'px'}); } else{ jQuery(this).siblings('.playpause').css({fontSize: '55px'}); }									  
101	});			  
102});

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.