aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2018-01-03 22:10:29 +0100
committerhellekin <hellekin@cepheide.org>2018-01-03 22:10:29 +0100
commit09c870dd29fc98904fbbe02765e9bdc1944f77ba (patch)
treea24d8dda118ba8f78dbf14d8553225de320df5e3
parent0d02c876f8b8b2d4d482bca35b2b2f19153a469a (diff)
downloadlesoiseaux.io-09c870dd29fc98904fbbe02765e9bdc1944f77ba.tar.gz
Ah, SVG woes... Shorten and smoothen
-rw-r--r--assets/js/ps-app.js14
1 files changed, 4 insertions, 10 deletions
diff --git a/assets/js/ps-app.js b/assets/js/ps-app.js
index 2007469..5e5af7e 100644
--- a/assets/js/ps-app.js
+++ b/assets/js/ps-app.js
@@ -3,18 +3,12 @@
$(document).ready(function() {
// Make each .media section clickable to reach ./<id>/
- $('.media section').each(function(_, e) {
- e.onclick = function(e) {
- var id = false
- e.path.forEach(function(e) {
- if (e.id) id = e.id
- if (id !== false) return id
- })
- if (id !== false)
- window.location = './' + id + '/'
+ [ 'gfx', 'txt', 'vdo' ].forEach(function(id) {
+ $('#' + id).onclick = function() {
+ window.location = '/' + id + '/';
return false
}
- })
+ }
});