PageSourceSearch

https://www.rifugioitaliakj2.org/wp-content/themes/collect/js/theme.js?ver=5.4.23

js rifugioitaliakj2.org collected 2026-10-04 17:35:08 UTC 2,447 bytes, 89 lines download raw bytes

1( function( $ ) {
2	$( '.main-navigation' )
3		.find( '.menu-item-has-children > a' ).after( '<i class="fa fa-caret-down"></i>' )
4		.end()
5		.find( '.menu-item-has-children i' ).on( 'click', function() {
6			var $el = $(this),
7				$parent = $el.parent();
8
9			$el.parent().parent().find( 'li' ).not( $parent ).removeClass( 'sub-menu-open' );
10			$el.parent().toggleClass( 'sub-menu-open' );
11		} );
12
13	$( '.nav-open' ).click( function() {
14		$( 'body' ).toggleClass( 'menu-open' );
15	} );
16
17	$( '.nav-search' ).click( function() {
18		$( 'body' ).addClass( 'search-open' );
19		$( '.search-bar' ).find( '.search-field' ).focus();
20	} );
21
22	$( '#page' ).on( 'click', '.close-search', function() {
23		$( 'body' ).removeClass( 'search-open' );
24	} );
25
26	// Masonry for home page
27	var $container = $( '#masonry' ),
28		resizeTimer, $new_items;
29
30	if ( 0 !== $container.length ) {
31		$container.imagesLoaded( function(){
32			if ( $( 'body' ).hasClass( 'rtl' ) ) {
33				$container.masonry( {
34					itemSelector: '.front-box',
35					isOriginLeft: false
36				} );
37			} else {
38				$container.masonry( {
39					itemSelector: '.front-box',
40				} );
41			}
42
43			// Show the blocks
44			$( '.home-container, .featured-container' ).css( { opacity: 1 } );
45	    } );
46
47		$( document.body ).on( 'post-load', function () {
48			$new_items = $( '.infinite-wrap .front-box' );
49
50			$container.append( $new_items );
51			$container.masonry( 'appended', $new_items );
52			collect_adjustPosts();
53
54			// Force layout correction after 1500 milliseconds
55			setTimeout( function () {
56				$container.masonry();
57			}, 500 );
58		} );
59
60		$( document ).ready( function() {
61			collect_adjustPosts();
62		} );
63
64		$( window ).on( 'resize', function() {
65			clearTimeout( resizeTimer );
66			resizeTimer = setTimeout( function() {
67				collect_adjustPosts();
68			}, 250 );
69		} );
70	}
71
72	function collect_adjustPosts() {
73		$container.find( '.front-box' ).not( '.too-short' ).find( 'figure' ).not( '.has-post-thumbnail' ).each( function() {
74			var $contain = $(this),
75				$innerContainHeight = $('figcaption', this ).height(),
76				$header = $('header', this),
77				$headerHeight = $header.innerHeight(),
78				$content = $('.entry-content', this),
79				$contentHeight = $content.innerHeight(),
80				$wholeContentHeight = $headerHeight + $contentHeight;
81
82			if ( $innerContainHeight < $wholeContentHeight ) {
83				$contain.parent().addClass('too-short');
84			} else {
85				$contain.parent().removeClass('too-short');
86			}
87		} );
88	}
89} )( jQuery );

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.