Skip to content

Instantly share code, notes, and snippets.

View zizoclimbs's full-sized avatar
🧗

Ahmed Abdelaziz zizoclimbs

🧗
  • STC
  • Egypt
View GitHub Profile
@zizoclimbs
zizoclimbs / focus-within.js
Created April 8, 2019 14:53 — forked from aFarkas/focus-within.js
simple focus-within polyfill
(function(window, document){
'use strict';
var slice = [].slice;
var removeClass = function(elem){
elem.classList.remove('focus-within');
};
var update = (function(){
var running, last;
var action = function(){
var element = document.activeElement;