Sha256: 83ca81b5f3df005a472f76f4d846d75e037a6bef8a891ea7bda2e55b2881c42b

Contents?: true

Size: 466 Bytes

Versions: 7

Compression:

Stored size: 466 Bytes

Contents

// Data attribute switch
var toggleState	= function (elem, one, two) {
var elem	= document.querySelector(elem);
elem.setAttribute('data-state', elem.getAttribute('data-state') === one ? two : one);
};

// Mobile navigation toggle selector
var buttonMenu = document.querySelector('.button--nav');
if (typeof(buttonMenu) != 'undefined' && buttonMenu != null) {
	buttonMenu.onclick = function (e) {
		toggleState('.nav', 'open', 'closed');
		e.preventDefault();
	};
};

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
garth-jekyll-theme-0.2.8 _includes/theme.js
garth-jekyll-theme-0.2.7 _includes/theme.js
garth-jekyll-theme-0.2.6 _includes/theme.js
garth-jekyll-theme-0.2.5 _includes/theme.js
garth-jekyll-theme-0.2.4 _includes/theme.js
garth-jekyll-theme-0.2.3 _includes/theme.js
garth-jekyll-theme-0.2.1 _includes/theme.js