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
<!doctype html> | |
<html> | |
<head> | |
<title>Guess My Number</title> | |
</head> | |
<body> | |
<h3 id="t"></h3> | |
<ul id="o"></ul> | |
<input id="g" /> | |
<button id="b">Guess</button> |
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
// When a script appends new SCRIPT tags to the HEAD or BODY, it can | |
// run into serious trouble. If it was originally included in the HEAD, the | |
// HEAD might not have fully rendered when it fires, and the BODY isn't there yet. | |
// And if it's in the BODY, older browsers may blow chunks if it tries to append | |
// SCRIPT tags to the HEAD. | |
// | |
// What seems to work: be HEAD/BODY agnostic. Look for the first SCRIPT tag on the | |
// page and insert before it. | |
var runScript = function(url) { |
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 (w, d, a) { | |
var $ = w[a.k] = {}; | |
$.a = a; | |
$.w = w; | |
$.d = d; | |
$.f = (function () { | |
return { | |
getEl: function (v) { | |
// helper: which is the target of this event? | |
var el; |
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
// twitter favorites | |
(function (w, d, a) { | |
var $ = w[a.el] = {}; | |
$.w = w; | |
$.d = d; | |
$.a = a; | |
$.f = (function () { | |
return { | |
listen : function (el, ev, fn) { |
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
I upgraded to IOS5 last night and turned everything (iCloud, Find My iPhone) on. First thing I noticed this morning was that my contacts were all gone. | |
If you turned on iCloud and your contacts are missing, try this: | |
Settings -> iCloud -> Contacts OFF | |
Keep previously synced iCloud contacts on your phone | |
(phone will tell you it's turning off iCloud contacts) | |
Turn Contacts BACK ON | |
Merge your contacts with iCloud | |
(phone will tell you it's turning on iCloud contacts) |
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
<!doctype html> | |
<html> | |
<head><title>Chaining JavaScript Functions with Eval</title></head> | |
<body> | |
<p>I was feeling deeply frustrated with my lack of ability to figure out how to do this the Right Way, so here it is in the Wrongest Way Possible.</p> | |
<script> | |
var a = function(s) { |
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 (w, d, a) { | |
var $ = w[a.k] = { | |
"a": a, "w": w, "d": d, | |
"s": {}, | |
"v": {'el': []}, | |
"f": ( function () { | |
return { | |
listen : function (el, ev, fn) { | |
if(typeof $.w.addEventListener !== 'undefined') { | |
el.addEventListener(ev, fn, false); |
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(d){alert(d.title);}(document)); |
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
<html> | |
<head> | |
<title>Testing</title> | |
<body> | |
woo yay | |
</body> | |
</html> |