aboutsummaryrefslogtreecommitdiff
path: root/assets/js/ps-app.js
blob: da6442e478d2ac194a2f651254eb46b58e11e1da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
(function($) {

    $(document).ready(function() {

	// Make each .media section clickable to reach ./<id>/
	[ 'gfx', 'txt', 'vdo' ].forEach(function(id) {
	    $('#' + id)
		.click(function(e) {
		    window.location = `/${id}/`;
		    return false
		})
		.mouseover(function(e) {
		    e.target.style.cursor = 'pointer'
		    return false
		})
		.mouseout(function(e) {
		    e.target.style.cursor = 'not-allowed'
		    return false
		})
	})
	$('.media').mouseout(function(e) {
	    e.target.style.cursor = 'auto'
	    return false
	})

    });

})($)