aboutsummaryrefslogtreecommitdiff
path: root/assets/js/ps-app.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/ps-app.js')
-rw-r--r--assets/js/ps-app.js8
1 files changed, 7 insertions, 1 deletions
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 ./<id>/
$('.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
}
})