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
( ͡° ͜ʖ ͡°) | |
(•_•) ( •_•)>⌐■-■ (⌐■_■) |
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 joevent = (function () { | |
// private vars | |
// JOE NOTE: add _ to varnames? | |
var debug = false; | |
var hooks = {}; | |
// private methods | |
var _call_hook = function (method, args, context) { | |
args.push(context); // should this be here or in fire_event() ? | |
method.apply(window, args); |
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
// google chrome workaround | |
var log = function () { | |
console && console.log && console.log.apply(console,arguments); | |
}; |
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 lang="en"> | |
<head> | |
<!-- http://code.flickr.net/2013/06/04/adventures-in-jank-busting-parallax-performance-and-the-new-flickr-home-page/ --> | |
<meta charset="utf-8"> | |
<title>Parallax</title> | |
<style type="text/css"> | |
body { | |
height: 10000px; |
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
.myBounceDiv { | |
-moz-animation:bounce .40s linear; | |
-webkit-animation:bounce .40s linear; | |
} | |
@-moz-keyframes bounce { | |
0%{ -moz-transform:scale(0); opacity:0;} | |
50%{ -moz-transform:scale(1.3); opacity:0.4; } | |
75%{ -moz-transform:scale(0.9); opacity:0.7;} | |
100%{ -moz-transform:scale(1); opacity: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
$.ajax({ | |
type: "POST", | |
url: "/route/to/dealie", | |
dataType: 'json', | |
data: { | |
var1 : var1, | |
var2 : var2 | |
}, | |
// given a json object with result property | |
success: function(response) { |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Title</title> | |
<meta name="description" content="The HTML5 Herald"> | |
<meta name="author" content="SitePoint"> |
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
// http://yuiblog.com/blog/2007/06/12/module-pattern/ | |
//Self-Executing Anonymous Func: Part 2 (Public & Private) | |
(function( skillet, $, undefined ) { | |
//Private Property | |
var isHot = true; | |
//Public Property | |
skillet.ingredient = 'Bacon Strips'; |
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
return function (_array, _id) { | |
var _result = {}; | |
var _clean_array = _.compact(_array); | |
_result.next = _clean_array[($.inArray(_id, _clean_array) + 1) % _clean_array.length]; | |
_result.prev = _clean_array[($.inArray(_id, _clean_array) - 1 + _clean_array.length) % _clean_array.length]; | |
return _result; | |
}; |
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> | |
<title>My Appola</title> | |
<script src="lodash.js"></script> | |
<script src="JocalStorage.js"></script> | |
<script src="mithril.js"></script> | |
<script> | |
JocalStorage.init(); | |
// create mithril module | |
var todo = {}; |
OlderNewer