This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1: how could you rewrite the following to make it shorter? | |
bar['doSomething' + (foo?'':'Else')](el); | |
// 2: what is the faulty logic in the following code? | |
/* | |
var foo = 'hello'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Accordion = this.Accordion = function(element, options) { | |
this.element = jQuery(element); | |
this.options = jQuery.extend({}, this.defaults, options); | |
this.baffles = []; | |
this.initialize(); | |
}; Accordion.prototype = { | |
defaults: { | |
title: 'h3', | |
preactivate: [0] | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!window.Overlay){ | |
throw new Error('the Class "Overlay" doesn\'t appear to be present'); | |
} | |
/* | |
* Overlay Mask | |
*/ | |
(function($){ | |
var Mask = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!window.Oakley){ | |
Oakley = {}; | |
if(!Oakley.products){ | |
Oakley.products = {}; | |
} | |
} | |
Oakley.products.jawbone = { | |
"product_key": "jawbone", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function () { | |
var REGEX = /:(latch(ed$)?)/i; | |
function removeLatched(type){ | |
if(type.indexOf(':')){ | |
if(REGEX.test(type)){ | |
type = type.replace(REGEX,''); | |
this._latched[type] = 1 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// The code in this file should: | |
// - build a thumbnail container | |
// - populate the container with thumbnails | |
// - when a thumbnail is clicked, the main image should be updated with the appropriate image | |
// | |
// This code should be optional, and initiate itself if included. | |
// | |
(function(){ | |
var thumbContainer = document.createDocumentFragment(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function(global,namespace){ | |
if(!namespace) namespace = global; | |
/* | |
--- | |
name: Hash | |
authors: ["Chase Wilson"] | |
requires: [typeOf] | |
provides: [Hash] | |
... | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function(global, namespace){ | |
if(!namespace) namespace = global; | |
if(namespace.typeOf) return; | |
namespace.typeOf = function(item){ | |
if (item == null) return 'null'; | |
var thetype = typeof item; | |
if (thetype === 'object') { | |
if (item) { | |
if (typeof item.length === 'number' && !(value.propertyIsEnumerable('length')) && typeof value.splice === 'function') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(global,namespace){ | |
if(!namespace) namespace = {}; | |
if (!namespace._jsonp_id) namespace._jsonp_id = 0; | |
namespace.JSONP = function(url, options) { | |
if (!namespace._jsonp_id) { | |
namespace._jsonp_id = 0; | |
} | |
var doc = document, | |
head = doc.getElementsByTagName('head')[0] || doc.body, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!Object.namespace) | |
Object.namespace = function( str ){ | |
if(!str) return; | |
var i = 0 | |
,base = window | |
,shards,length | |
if(str.indexOf("::") !== -1){ | |
shards = str.split("::"); | |
base = window[shards[0]] = window[shards[0]] || {}; |
OlderNewer