Button
by Juri Rudi
HTML
<fieldset id="cornice">
<p>
Clicca sul bottone: una volta, per farlo diventare rosso; due volte, per farlo scomparire.<br />
Clicca in un punto qualsiasi di questa cornice per far apparire il bottone di colore giallo.
</p>
</fieldset>
<center>
<button id="bottone">BOTTONE</button>
</center>
CSS
#bottone {
background-color: green;
}
JavaScript
$("#bottone").click(function() {
$("#bottone").css("background-color", "red");
});
$("#bottone").dblclick(function() {
$("#bottone").hide();
});
$("#cornice").click(function() {
$("#bottone").css("background-color", "yellow");
$("#bottone").show();
});