eventi jquery

by Juri Rudi

HTML

<center>
	<div id="id_off">off</div>
	<div id="id_on">on</div>
	<div id="id_one">one</div>
</center>

CSS

div {
  border: 1px solid black;
	border-radius: 10px;
	background-color: #e6eeff;
  width: 150px;
  height: 50px;
	text-align: center;
}

JavaScript

//.off()
$("#id_off").click(function() {
	$("#id_on").off("click");
  alert("Evento rimosso da tasto ON");
});

//.on()
$("#id_on").on("click",function() {
  alert("OK");
});

//.one()
$("#id_one").one("click",function() {
	alert("OK");
});