PageSourceSearch

https://www.thesecondevolution.com/wp-content/themes/snaps/js/scripts.js

js thesecondevolution.com collected 2026-10-02 13:33:01 UTC 1,775 bytes, 59 lines download raw bytes

1jQuery( document ).ready( function( $ ) {
2	$('div.post-format-content').hover(
3		function () {
4			$( this ).find( '.content-wrap' ).addClass( 'showcontent' );
5		},
6		function () {
7			//$( this ).find( '.gallery-caption' ).removeClass( 'show' ).addClass( 'hide' );
8		}
9	);
10
11	/* Menu */
12	var $masthead = $( '#main' ),
13	    timeout = false;
14
15	$.fn.smallMenu = function() {
16		$masthead.find( '#anchor.site-navigation' ).removeClass( 'main-navigation' ).addClass( 'main-small-navigation' );
17		$masthead.find( '#anchor.site-navigation h1' ).removeClass( 'assistive-text' ).addClass( 'menu-toggle' );
18
19		$( '.menu-toggle' ).unbind( 'click' ).click( function() {
20			$masthead.find( 'ul.menu' ).toggle();
21			$( this ).toggleClass( 'toggled-on' );
22		} );
23	};
24
25	// Determine menu style when loading
26	var winWidth = $( window ).width();
27	menuWidth = 0;
28
29	$( '.site-navigation ul.menu > li.menu-item' ).each(function() {
30		menuWidth2 = $( this ).outerWidth( true );
31  		menuWidth = parseInt( menuWidth + menuWidth2 );
32	});
33	if( ( ( menuWidth ) > ( winWidth - 100 ) ) ) {
34		$.fn.smallMenu();
35	}
36
37	var delay = (function(){
38		var timer = 0;
39		return function( callback, ms ) {
40	    	clearTimeout( timer) ;
41	    	timer = setTimeout( callback, ms );
42	  	};
43	})();
44
45	// Determine menu style when resized
46	$( window ).resize( function() {
47		delay( function() {
48			var winWidth = $( window ).width();
49			if( ( ( menuWidth ) > ( winWidth - 100 ) ) ) {
50				$.fn.smallMenu();
51			} else {
52			 	$masthead.find( '#anchor.site-navigation' ).removeClass( 'main-small-navigation' ).addClass( 'main-navigation' );
53				$masthead.find( '#anchor.site-navigation h1' ).removeClass( 'menu-toggle' ).addClass( 'assistive-text' );
54			 	$masthead.find( 'ul.menu' ).removeAttr( 'style' );
55			}
56		}, 500);
57	} );
58
59});

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.