I need to add a box to the end of the div when I hover on that div. The div needs to stay when I roll ontoit from .myDiv and must go away if I click within it or anywhere outside, but not if I click within .myDiv. Also if i hover out from .myDiv the yellow div needs to close.
var yHeight = $(".yDiv").height();
$(".myDiv").hover(
function () {
$(this).append($("<div class="yDiv"> ... </div>"));
},
function () {
$(this).find(".yDiv").remove();
}
);
<div class="myDiv" style="width:100px">this is my div</div>
<div class="yDiv" style="display:none;width:100px">this is my div</div>
I need to position yellow div in the middle. I think I got some of it...
