Skip to content

Instantly share code, notes, and snippets.

View prashnts's full-sized avatar
🥔
potatoes?

Prashant Sinha prashnts

🥔
potatoes?
View GitHub Profile
@prashnts
prashnts / ie8_node_enum.js
Created October 17, 2015 20:57
IE8 Node Enum
var Node = Node || {
ELEMENT_NODE: 1,
ATTRIBUTE_NODE: 2,
TEXT_NODE: 3
};
(function() {
var arrays, basicObjects, deepClone, deepExtend, deepExtendCouple, isBasicObject,
__slice = [].slice;
deepClone = function(obj) {
var func, isArr;
if (!_.isObject(obj || _.isFunction(obj))) {
return obj;
}
if (_.isDate(obj)) {
$.scrollWindowTo = function(pos, duration, cb) {
if (duration == null) {
duration = 0;
}
if (pos === $(window).scrollTop()) {
$(window).trigger('scroll');
if (typeof cb === "function") {
cb();
}
return;