Test case for jQuery Ticket 8209
hover over input chrome
by jitter
HTML
<div id="container">
<span>Quantity:</span>
<input id="text" type="text" value="10" size="5" />
<input type="button" value=" Add to Cart " />
</div>
CSS
#container {
border:solid 1px black;
background-color:gray;
width:250px;
height:200px;
}
JavaScript
var cont = $("#container"),
txt = $("#text");
function log(str, t, e) {
//console.log(str, t.id, e.target.id, e.originalEvent.type);
console.log(str, e.relatedTarget, e.relatedTarget.parentNode);
}
function handle1(e) {
log("handle1", this, e);
cont.css("background-color", (e.type == "mouseenter" ? "blue" : "gray"));
}
function handle2(e) {
log("handle2", this, e);
}
cont.hover(handle1);
txt.hover(handle2);