@miketaylr, Opera Software
@miketaylr, Opera Software
var wiimote = new Wii.Remote(1, {horizontal: true});
wiimote.when('pressed_a', function() {
alert('Wiimote #1 pressed the A Button!');
});
Wii.listen();
#card-a {
nav-index: 1;
nav-right: #card-b;
nav-left: #card-c;
}
See also nav-top
& nav-bottom
properties.
var cards = document.querySelectorAll('img'),
log = document.getElementById('log').querySelector('span');
Array.prototype.forEach.call(cards, function(card){
card.onclick* = function(){this.classList.toggle('rotate')};
card.onmouseover* = showLog;
});
*But really, just use addEventListener
or Rick Waldron will come after you.
Hardware key | Key code constant | Comment |
---|---|---|
↑ | VK_UP | Always available* |
→ | VK_RIGHT | Always available* |
↓ | VK_DOWN | Always available* |
← | VK_LEFT | Always available* |
Confirm/Select/OK | VK_ENTER | Always available* |
Exit | N/A | Always available (handled by native firmware) |
Back/Return | VK_BACK_SPACE | Optional but recommended |
BLUE | VK_BLUE | Optional but recommended |
RED | VK_RED | Optional but recommended |
GREEN | VK_GREEN | Optional but recommended |
YELLOW | VK_YELLOW | Optional but recommended |
function handler(e){
if (e.keyCode == VK_RED){
amazingRedButtonFn();
}
}
function handler(e){
if (('VK_RED' in window)&&(e.keyCode == VK_RED)){
amazingRedButtonFn();
}
}
media="tv"
Google TV's browser will not respond to the TV media type, because there are enough 'screen' stylesheets on the web that doing so would produce too much breakage for Gtv users.
Full HD
<link rel="stylesheet" media="screen and (min-width: 1920px)" href="...">
HD-Ready
<link rel="stylesheet" media="screen and (min-width: 1280px)
and (max-width: 1920px)" href="...">
Smaller
<link rel="stylesheet" media="screen and (max-width: 1280px)" href="...">
<script src="/s/jquery-1.7.1.min-core-ord1.js"</script>
<script> jQuery.noConflict(); </script>
<script src="/s/mootools-1.2.5-core-nc.js"></script>
<script src="/s/mootools-1.2-more-nc.js"></script>
<script src="/s/swfobject.js"></script>
<script src="/s/global.js"></script>
<script src="/s/nav.js"></script>
Mike Taylor, Opera Software