Skip to content

Instantly share code, notes, and snippets.

View zwang008's full-sized avatar

Zhaojie Wang zwang008

  • teambition
  • Shanghai, CN
View GitHub Profile
@zwang008
zwang008 / stylesheet.css
Created May 28, 2014 01:10
css: bounceBubble effect
#myCanvas {
width: 100%;
height: 100%;
padding: 200px;
}
@zwang008
zwang008 / gist:91b7c5f5cc1124211f87
Last active August 29, 2015 14:01 — forked from yakcode/gist:4186966
HTML: Starting Template
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title></title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
@zwang008
zwang008 / gist:547228598bf4229b3a77
Last active August 29, 2015 14:01 — forked from yakcode/gist:4187013
JavaScript: Sexy PubSub
// Works in modern browsers + IE9, but Modernizr has a polyfill baked in for function.bind.
// Uses Javascript's new bind function
//Hat tip Paul Irish 'and tuts'
var o = $( {} );
$.subscribe = o.on.bind(o);
$.unsubscribe = o.off.bind(o);
$.publish = o.trigger.bind(o);
@zwang008
zwang008 / gist:dfcbc44d32aac98c61be
Last active August 29, 2015 14:01 — forked from yakcode/gist:4187020
CSS: Image Replacement
/* This is a new way to use image replacement without using text indent to form a box way to the screens */
.ir {
border: 0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}
@zwang008
zwang008 / gist:0afa35c9269540002f0f
Last active August 29, 2015 14:01 — forked from yakcode/gist:4187044
JavaScript: JQuery PubSub
//Jquery version of using pubsub
(function($) {
var o = $( {} );
$.each({
on: 'subscribe',
trigger: 'publish',
off: 'unsubscribe'
}, function ( key, api ) {
@zwang008
zwang008 / main.js
Created May 27, 2014 08:38
javascript: bounceBubbles effect
//updated 1st time
var red = [0, 100, 63];
var orange = [40, 100, 60];
var green = [75, 100, 40];
var blue = [196, 77, 55];
var purple = [280, 50, 60];
var myName = "Pure Consulting";
letterColors = [red,orange,green,blue,purple];
@zwang008
zwang008 / index.html
Created May 27, 2014 08:36
html: bounceBubbles effect
<!DOCTYPE html>
<html>
<head>
<!-- // <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script> -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" src="http://s3.amazonaws.com/codecademy-content/courses/hour-of-code/js/alphabet.js"></script>
<link type="text/css" rel="stylesheet" href="css/stylesheet.css"/>
</head>
<body>
<h2 style="float: right;">Data Driven Intellingence</h2>