Kas*_*ady 3 css jquery mouseenter jquery-hover
我有一个div包含多个具有绝对位置的div,我想处理父div的鼠标输入事件我使用这个小提琴: 小提琴 它没有正常工作是他们的任何其他方式来处理这个问题?
HTML标记
<div id="content">
SYDNEY (Reuters) - An Australian man had his driving licence suspended for 10 months and was fined after he was
<div class="abs"></div>
caught driving a scooter made of a motorised beer cooler capable of carrying several dozen drinks -- after knocking back a few.
</div>
<div id="output">
</div>
Run Code Online (Sandbox Code Playgroud)
脚本
$(function() {
var output = $("#output");
$("#content")
.mouseenter(function(e){
output.text("I'm in!");
}).mouseout(function(e) {
output.text("I'm out!");
});
});?
#content {
background-color:#cccc99;
position:relative;
}
.abs{
position:absolute;
top:0px;
left:70px;
background-color:red;
width:30px;
height:30px;
}?
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6224 次 |
| 最近记录: |