jQuery/mouse...()

解説 各マウスアクション
sample1
sample1code
$(function(){
  $("#sample1box").mouseover(function(){
	$(this).css({color:"black",background:"yellow"}).text("mouseover");
  });
  $("#sample1box").mouseout(function(){
	$(this).css({color:"black",background:"green"}).text("mouseout");
  });
  $("#sample1box").mousedown(function(){
	$(this).css({color:"white",background:"red"}).text("mousedown");
  });
  $("#sample1box").mouseup(function(){
	$(this).css({color:"white",background:"navy"}).text("mouseup");
  });
});
sample2
sample2Box
sample2code
$(function(){
  $("#sample2Box").mouseenter(function(){
  	$(this).css({color:"#1f8a76", background:"#f4721e"}).text("mouseenter");
  });
  $("#sample2Box").mouseleave(function(){
  	$(this).css({color:"#57bb4a", background:"#faaa34"}).text("mouseleave");
  });
});
sample3
s3Div
sample3code
function s3Func(){
  $("#s3Div").css({
  	width: "200px",
  	height: "200px",
  	background: "#798adc"
  }).mousemove(function(e){
  	var x = e.pageX - this.offsetLeft;
  	var y = e.pageY - this.offsetTop;
  	$(this).text("x:" + x + ",y:" + y);
  });
}