PageSourceSearch

https://blog.bigsmoke.us/wp-content/themes/hemingway/assets/js/global.js?ver=2.3.2

js bigsmoke.us collected 2026-09-24 19:07:07 UTC 2,423 bytes, 88 lines download raw bytes

1jQuery(document).ready(function($) {
2
3	// Toggle mobile-menu.
4	$(".nav-toggle").on("click", function(){	
5		$(this).toggleClass("active");
6		$(".mobile-menu").slideToggle();
7		if ($(".search-toggle").hasClass("active")) {
8			$(".search-toggle").removeClass("active");
9			$(".blog-search").slideToggle();
10		}
11	});
12	
13	// Toggle search form.
14	$(".search-toggle").on("click", function(){	
15		$(this).toggleClass("active");
16		$(".blog-search").slideToggle();
17		if ($(".nav-toggle").hasClass("active")) {
18			$(".nav-toggle").removeClass("active");
19			$(".mobile-menu").slideToggle();
20		}
21	});
22	
23	// Show mobile-menu > 700.
24	$(window).resize(function() {
25		if ($(window).width() > 800) {
26			$(".toggle").removeClass("active");
27			$(".mobile-menu").hide();
28			$(".blog-search").hide();
29		}
30	});
31	
32	// Cool header image scroll.
33	$(window).scroll(function(e){
34		if ($(window).width() > 800) {
35			$('.header').css({
36				'bottom' : -($(this).scrollTop()/3)+"px",
37			}); 
38			var thisdist = $(this).scrollTop();
39			var headerheight = $(".header").outerHeight();
40			$('.blog-info').css({
41				'opacity' : (1 - thisdist/headerheight)
42			}); 
43		} else {
44			$('.header').css({'bottom' : 'auto'}); 	
45			$('.blog-info').css({'opacity' : "1" });
46		}
47	});
48	
49	// Resize videos after container.
50	var vidSelector = ".post iframe, .post object, .post video, .widget-content iframe, .widget-content object, .widget-content iframe";	
51	var resizeVideo = function(sSel) {
52		$( sSel ).each(function() {
53			var $video = $(this),
54				$container = $video.parent(),
55				iTargetWidth = $container.width();
56
57			if ( !$video.attr("data-origwidth") ) {
58				$video.attr("data-origwidth", $video.attr("width"));
59				$video.attr("data-origheight", $video.attr("height"));
60			}
61
62			var ratio = iTargetWidth / $video.attr("data-origwidth");
63
64			$video.css("width", iTargetWidth + "px");
65			$video.css("height", ( $video.attr("data-origheight") * ratio ) + "px");
66		});
67	};
68
69	resizeVideo(vidSelector);
70
71	$(window).resize(function() {
72		resizeVideo(vidSelector);
73	});
74	
75	// Smooth scroll to header.
76    $('.tothetop').click(function(){
77		$('html,body').animate({scrollTop: 0}, 500);
78		$(this).unbind("mouseenter mouseleave");
79        return false;
80    });
81
82	// Add a class to enable keyboard navigation of the main menu dropdown.
83	$( '.blog-menu a' ).on( 'blur focus', function( e ) {
84		$( this ).parents( 'li.menu-item-has-children' ).toggleClass( 'focus' );
85	} );
86	
87
88});

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.