PageSourceSearch

https://forestsforpeople.org/wp-content/themes/ambition/js/scripts.js?ver=5.4.24

js forestsforpeople.org collected 2026-10-10 00:56:47 UTC 1,375 bytes, 54 lines download raw bytes

1jQuery( function() {
2		// Search toggle.
3		jQuery( '.search-toggle' ).on( 'click', function( event ) {
4			var that    = jQuery( this ),
5				wrapper = jQuery( '#search-box' );
6			that.toggleClass( 'active' );
7			wrapper.toggleClass( 'hide' );
8			if ( that.is( '.active' ) || jQuery( '.search-toggle' )[0] === event.target ) {
9				wrapper.find( '.s' ).focus();
10			}
11		} );
12		// Enable menu toggle for small screens.
13		( function() {
14			var nav = jQuery( '.main-navigation' ), button, menu;
15			if ( ! nav ) {
16				return;
17			}
18			button = nav.find( '.menu-toggle' );
19			if ( ! button ) {
20				return;
21			}
22			// Hide button if menu is missing or empty.
23			menu = nav.find( '.nav-menu' );
24			if ( ! menu || ! menu.children().length ) {
25				button.hide();
26				return;
27			}
28			jQuery( '.menu-toggle' ).on( 'click', function() {
29				nav.toggleClass( 'toggled-on' );
30			} );
31		} )();
32} );
33
34jQuery(document).ready(function(){
35	// hide #back-top first
36	jQuery(".back-to-top").hide();
37	// fade in #back-top
38	jQuery(function () {
39		jQuery(window).scroll(function () {
40			if (jQuery(this).scrollTop() > 1000) {
41				jQuery('.back-to-top').fadeIn();
42			} else {
43				jQuery('.back-to-top').fadeOut();
44			}
45		});
46		// scroll body to 0px on click
47		jQuery('.back-to-top a').click(function () {
48			jQuery('body,html,header').animate({
49				scrollTop: 0
50			}, 800);
51			return false;
52		});
53	});
54});

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.