From b95ad0b19399a0958ca72fbba3b78e8dd14a5c3a Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 30 Dec 2017 23:43:05 +0100 Subject: Update ps home --- assets/js/ps-app.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'assets/js/ps-app.js') diff --git a/assets/js/ps-app.js b/assets/js/ps-app.js index 66d67fe..2007469 100644 --- a/assets/js/ps-app.js +++ b/assets/js/ps-app.js @@ -5,7 +5,13 @@ // Make each .media section clickable to reach .// $('.media section').each(function(_, e) { e.onclick = function(e) { - window.location = './' + e.target.id + '/' + 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 + '/' return false } }) -- cgit v1.2.3