Skip to content

Instantly share code, notes, and snippets.

Avatar
🪶
Chaos

redgoose.eth redgoose-dev

🪶
Chaos
View GitHub Profile
@yairEO
yairEO / events.namespace.js
Last active Feb 21, 2022
Event Handler Namespace in Vanilla JavaScript
View events.namespace.js
var events = (function(){
function addRemove(op, events, cb){
if( cb )
events.split(' ').forEach(name => {
var ev = name.split('.')[0]
cb = cb || this._eventsNS[name]
this[op + 'EventListener'].call(this, ev, cb)
if(op == 'add')
@jackfuchs
jackfuchs / jquery.support.cssproperty.js
Last active Aug 26, 2019
Extends the jQuery.support object to CSS Properties
View jquery.support.cssproperty.js
/**
* jQuery.support.cssProperty
* To verify that a CSS property is supported
* (or any of its browser-specific implementations)
*
* @param p css property name
* @param rp optional, if set to true, the css property name will be returned
* instead of a boolean support indicator
* @return {mixed}
*