aboutsummaryrefslogtreecommitdiff
path: root/assets/js
diff options
context:
space:
mode:
authorYour Name <you@example.com>2017-12-30 23:43:05 +0100
committerYour Name <you@example.com>2017-12-30 23:43:05 +0100
commitb95ad0b19399a0958ca72fbba3b78e8dd14a5c3a (patch)
tree057184c143555c3f6c7b3eb00e77b47566733799 /assets/js
parente3d5ebb12d2fb731100ff4b568d049ee59a4de8f (diff)
downloadlesoiseaux.io-b95ad0b19399a0958ca72fbba3b78e8dd14a5c3a.tar.gz
Update ps home
Diffstat (limited to 'assets/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
}
})