From 09c870dd29fc98904fbbe02765e9bdc1944f77ba Mon Sep 17 00:00:00 2001 From: hellekin Date: Wed, 3 Jan 2018 22:10:29 +0100 Subject: Ah, SVG woes... Shorten and smoothen --- assets/js/ps-app.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'assets') 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 .// - $('.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 } - }) + } }); -- cgit v1.2.3