PageSourceSearch

https://walterpinem.me/projects/wp-content/themes/pinem/assets/js/offcanvas-nav.js

js walterpinem.me collected 2026-10-01 10:36:05 UTC 689 bytes, 22 lines download raw bytes

1// @author Calvin Koepke (@cjkoepke)
2// @link http://www.calvinkoepke.com/add-a-mobile-friendly-off-canvas-menu-in-genesis/
3// @version 1.1
4// @license Free to use as you wish. Please share if you appreciate, and link to the post above.
5
6jQuery( document ).ready( function( $ ) {
7
8	// Store our jQuery objects as variables
9	var body             = $( 'body' ),
10		toggleButtons    = $( '.menu-btn, .close-btn, .site-overlay' );
11
12	toggleButtons.click( function( event ) {
13		
14		// Prevent the default action of clicking a link
15		event.preventDefault();
16
17		// Toggle our main body class depending on whether it is present (false by default)
18		body.toggleClass( 'off-canvas-active' );
19
20	});
21
22});

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.