View difference between Paste ID: SJGRqSXZ and 78pbgwfy
SHOW: | | - or go back to the newest paste.
1
2
<!DOCTYPE html>
3
4
<html>
5
6
<head>
7
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
8
<style>
9
10-
	a.menu, a.menu:visited {
10+
	.menu a, .menu a:visited {
11
		font-family: helvetica, arial;
12
		font-size: 10px;
13
		color:white;
14
		text-shadow:0px 0px 5px black;
15
		text-decoration: none;
16
		padding:15px;
17
		margin: 0 20px;
18
	}
19-
	a.menu:hover {
19+
20
	.menu a:hover, .menu a.current {
21
		background-color: rgba(0,0,0,0.7);
22
		padding:15px;
23
		text-shadow: none;
24
		text-decoration: none;
25
		border-radius: 8px;
26
	}
27
	
28
	.menu {
29
		margin-top:40px;
30
		text-align:center;
31
	}
32
33-
<br><br>
33+
34
35
<!-- Loader jQuery -->
36-
<a href="#" class="menu">FORSIDE</a>
36+
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
37
38-
<a href="#" class="menu">UNDERSIDE</a>
38+
<script type="text/javascript">
39
	// tjekker at siden er loadet -->
40
	$(document).ready(function() {
41
	
42
		// Sætter en click funktion på alle links inde i .menu
43
		$('.menu a').click(function(){
44
			// fjerner classen "current" fra alle links inde i .menu
45
			$('.menu a').removeClass('current');
46
			// tilføjer classen "current" til det link du lige har klikket på
47
			$(this).addClass('current');
48
		});
49
	});
50
</script>
51
</head>
52
53
<body>
54
55
56
57
<div class="menu">
58
<a href="#">FORSIDE</a>
59
<a href="#">UNDERSIDE</a>
60
<a href="#">OGSAAVIDERE</a>
61
</div>
62
63
</body>
64
65
</html>