I have two divs, one for a short summary and one for a long summary.
When I hover over a short resume, the short resume disappears and a long resume appears.
When I "mouseout" from a long resume, it should disappear, and a short summary should appear.
The problem is that when I am still inside the border of a long resume, but because the sort summary was done, the mouseout event occurred
code:
<head> <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.js"></script> <script> function show(Fdiv) { $(Fdiv).css("display", "none"); $(Fdiv).next().css("display", "inline"); } function hide(Sdiv) { $(Sdiv).css("display", "none"); $(Sdiv).prev().css("display", "inline"); } </script> </head> <body> <div onmouseover="show(this)"> Sort summary <br /> Second Row</div> <div onmouseout="hide(this)" style="display:none"> Long Summary <br /> Second Row<br /> Third Row <br /> Fourth Row</div> </body> </html>
source share