aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinwei Zhao <[email protected]>2016-04-04 14:00:39 +0800
committerJinwei Zhao <[email protected]>2017-01-13 15:07:45 +0800
commite002d09d2b6b2317fec6caa8836b20e6709c5da3 (patch)
tree1e1623524986fc63abcab7b10912dffe55dc1da9 /Code/jinweiclarkchao.github.io/assets/stuff.js
parentdbcebe1def5c355120c61b575390d1d9ac355f67 (diff)
downloadjinwei.me-e002d09d2b6b2317fec6caa8836b20e6709c5da3.tar.gz
jinwei.me
Diffstat (limited to 'Code/jinweiclarkchao.github.io/assets/stuff.js')
-rw-r--r--Code/jinweiclarkchao.github.io/assets/stuff.js34
1 files changed, 0 insertions, 34 deletions
diff --git a/Code/jinweiclarkchao.github.io/assets/stuff.js b/Code/jinweiclarkchao.github.io/assets/stuff.js
deleted file mode 100644
index a1c8ebc..0000000
--- a/Code/jinweiclarkchao.github.io/assets/stuff.js
+++ /dev/null
@@ -1,34 +0,0 @@
1// Generated by CoffeeScript 1.8.0
2var load, putImages;
3
4$(document).on("keydown", function(e) {
5 if (e.keyCode === 39 && $("#js-next-post").length) {
6 $("#js-next-post").click();
7 }
8 if (e.keyCode === 37 && $("#js-previous-post").length) {
9 return $("#js-previous-post").click();
10 }
11});
12
13$(document).on("click", "a[id]", function(e) {
14 return _gaq.push(["_trackEvent", "Clicks", "clicked on " + e.target.id]);
15});
16
17$(document).on("click", "a:not([id])", function(e) {
18 return _gaq.push(["_trackEvent", "Clicks", "clicked on " + $(this).text()]);
19});
20
21load = function() {
22 return $(".img img").on("load", function() {
23 return $(this).closest(".img").addClass("show");
24 });
25};
26
27putImages = function(pics) {
28 var box, pic;
29 pic = pics[Math.floor(Math.random() * pics.length)];
30 box = $(".instagram");
31 box.html("");
32 box.append("<a target='_blank' href='" + pic.link + "' class=img><img src='" + pic.images.low_resolution.url + "'></div>");
33 return load();
34};
Powered by cgit v1.2.3 (git 2.41.0)