-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmouseovermadnessv3.html
61 lines (46 loc) · 1.59 KB
/
mouseovermadnessv3.html
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html>
<head>
<title>Mouseover Madness</title>
<style>
button{opacity:.25; list-style:none;}
.1 {opacity:.25;}
</style>
<script src="jQuery.min.js"></script>
</head>
<body>
<button type="button">I'm ready!</button>
<button type="button">You'll never take me alive, jQuery!</button>
<button type="button">You'll take me alive, jQuery!</button>
<script type="text/javascript" >
$(document).ready(function(){
//original code for mouse
//$("#nav li").mouseenter(function(){
// var thisli = $(this);
// thisli.fadeTo("fast", 1);
// thisli.dequeue();
// });
//$("#nav li").mouseleave(function(){
//var thisli = $(this);
//thisli.fadeTo("fast", .25);
//thisli.dequeue();
//});
//duplicating mouse code for keyboard focus
//this code is not working as designed right now
//the keyboard focus is working correctly, just not the fade in and fade out. might be a CSS problem?
$("#nav button").focusin(function(){
var thisbutton = $(this);
thisbutton.fadeTo("fast", 1);
thisbutton.dequeue();
});
$("#nav button").focusout(function(){
var thisbutton = $(this);
thisbutton.fadeTo("fast", .25);
thisbuttondequeue();
});
//this code adds the roles - add it to each section - now to figure out what ARIA roles to add!
//$("#nav li").attr("role","banner");
});
</script>
</body>
</html>