html:
<div class="all-goods">
<div class="item">
<div class="product">
<h3> <a href="#">服务机构</a> </h3>
<s></s>
</div>
<div class="product-wrap posone" style="height:360px;">
<div class="cf">
<div class="fl wd460 pl20 blee">
<p style="color:#e86842;font-size:17px;">xxx</p>
<br/>
<p style="height:38px;"><select>
<option>请选择验证方式</option>
<option>请选择验证方式</option>
<option>请选择验证方式</option></select> </p>
</div>
</div>
</div>js:
$(function(){ $('.all-goods .item').hover(function(){
$(this).addClass('active').find('s').hide();
$(this).find('.product-wrap').show();
},function(){
$(this).removeClass('active').find('s').show();
$(this).find('.product-wrap').hide();
});
});为什么选着下拉选项的时候,hover就会失焦啊,有人能指教下么JShover
$(function () {
$('.all-goods .item').mousemove(function (e) { selFocus = e.target.tagName;document.title=selFocus+"|"+new Date().getTime });
$('.all-goods .item').hover(function () {
$(this).addClass('active').find('s').hide();
$(this).find('.product-wrap').show();
}, function () {
if (selFocus) return;
$(this).removeClass('active').find('s').show();
$(this).find('.product-wrap').hide();
});
});
谢谢,不过这样虽然可以,但是好像会影响页面title,我直接把 hide()调了位置,然后达到了同样的效果...想了一天,郁闷