This file contains hidden or 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 Event = (function( $ ) { | |
var cache = {}, | |
slice = [].slice, | |
fake = { | |
remove: $.noop, | |
fireWith: $.noop | |
}; | |
function get( ev, createIfNeeded ) { |
This file contains hidden or 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 getName = (function() { | |
var cache; // private cache | |
// gets assigned to getName | |
return function() { | |
// return the cache if it's valid or | |
return cache || $.ajax({ | |
url: 'srv/echo', |
This file contains hidden or 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
<?php | |
## Nav data, as a JSON heredoc. Much less verbose than PHP arrays! | |
$navs = json_decode(<<<JSON | |
{ | |
"mlb": { | |
"title_link": "http://stats.boston.com/mlb/scoreboard.asp", | |
"nav": [ | |
{ "title": "Full Schedule", "url": "http://stats.boston.com/mlb/teamreports.asp?tm=02&report=schedule" }, | |
{ "title": "Statistics", "url": "http://stats.boston.com/mlb/teamreports.asp?yr=2009&tm=2&btnGo=Go&report=stats" }, |
This file contains hidden or 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 toString = Object.prototype.toString; | |
var class2type = { | |
"[object Boolean]": "boolean", | |
"[object Number]": "number", | |
"[object String]": "string", | |
"[object Function]": "function", | |
"[object Array]": "array", |