Skip to content

Instantly share code, notes, and snippets.

@zkareemz
zkareemz / javascript object type
Created Feb 14, 2016
Get the javascript object type
View javascript object type
function getType(o){
return Object.prototype.toString.call(o).split(' ').pop().replace(']','').toLowerCase();
}
@zkareemz
zkareemz / jquery-attached-events
Last active Aug 29, 2015
Get all jquery attached events
View jquery-attached-events
// This is a simple function to get all the attached jquery events on all the DOM elements
// you will find a new data attribute on the elements that has events attached to it.
(function() {
if (window.jQuery) {
var elms = [],
elm = {},
attrs = "",
evTypes = 0,
evCounter = 0,
elmCounter = 0,