PageSourceSearch

https://circle-line.co.jp/wp/wp-content/themes/circleline/js/navigation.js?ver=20140318

js circle-line.co.jp collected 2026-10-05 11:14:36 UTC 1,168 bytes, 43 lines download raw bytes

1/**
2 * Handles toggling the navigation menu for small screens and
3 * accessibility for submenu items.
4 */
5( function() {
6	var nav = document.getElementById( 'site-navigation' ), button, menu;
7	if ( ! nav ) {
8		return;
9	}
10
11	button = nav.getElementsByTagName( 'h3' )[0];
12	menu   = nav.getElementsByTagName( 'ul' )[0];
13	if ( ! button ) {
14		return;
15	}
16
17	// Hide button if menu is missing or empty.
18	if ( ! menu || ! menu.childNodes.length ) {
19		button.style.display = 'none';
20		return;
21	}
22
23	button.onclick = function() {
24		if ( -1 === menu.className.indexOf( 'nav-menu' ) ) {
25			menu.className = 'nav-menu';
26		}
27
28		if ( -1 !== button.className.indexOf( 'toggled-on' ) ) {
29			button.className = button.className.replace( ' toggled-on', '' );
30			menu.className = menu.className.replace( ' toggled-on', '' );
31		} else {
32			button.className += ' toggled-on';
33			menu.className += ' toggled-on';
34		}
35	};
36} )();
37
38// Better focus for hidden submenu items for accessibility.
39( function( $ ) {
40	$( '.main-navigation' ).find( 'a' ).on( 'focus.twentytwelve blur.twentytwelve', function() {
41		$( this ).parents( '.menu-item, .page_item' ).toggleClass( 'focus' );
42	} );
43} )( 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.