Skip to content

Instantly share code, notes, and snippets.

View Freekbron's full-sized avatar

Freek Bron Freekbron

View GitHub Profile
@Freekbron
Freekbron / smart-keyboard-handler.js
Last active February 4, 2019 15:10
Keyfocus styling
const body = document.body;
const tabFocusClass = 'is-keyfocus';
const CODE_TAB = 9;
let focusState = false;
/**
* Handle logic, when onTabKeyPress fired at first.
* Then it changes state.
*/
function onFocusInHandler() {
@Freekbron
Freekbron / fa-icon-walker.php
Created November 11, 2014 10:07
Font Awesome - WordPress - Custom nav walker
<?php
/**
* Custom nav walker
*
* Custom nav walker to assign icons to menu items.
*/
class FA_Icon_Walker extends Walker_Nav_Menu
{
/**