So, I've got a small website that I'm working on-- it's very simple, I'm just using it to EVENTUALLY play with C++ and Javascript COM interfaces and bitwise operators.
But I'm getting stuck on the simple stuff.
Here's my HTML, CSS, and jQuery code respectively (formatted for jsfiddle).
<title>Can you guess the combination?</title>
<body>
<div>
<label id="instructions">Guess the combination and you win!</label>
</div>
<div class="button"></div>
<div class="button"></div>
<div class="button"></div>
<div class="button"></div>
<div class="button"></div>
</body>
.button {
background-color:#0F0;
width:3em;
height:3em;
display:table-cell;
float:left;
margin:0.5em;
}
#instructions {
font-family:roboto;
font-color:#bbbbb;
}
a {
font-family:roboto;
}
$(document).ready(function () {
$(".button").hover(
function () {
$(this).css("background", "#ddd");
},
function () {
$(this).css("background", "#ccc");
});
});
Here is a jsfiddle of what I have, where hovering over the boxes should cause them to change color. I can't get this example working. It's very simple, but I can't seem to tell what I've done.
Later I'll have more advanced features, but as it is I'm tired of staring at this myself.
Do you have any ideas, {StackOverflow Member}?
