<table width="100%" align="center" cellpadding="1" cellspacing="1">
<tr>
<td id="gmyTab01"><div class="gt-active">原油</div></td>
<td id="gmyTab02"><div>纯苯</div></td>
</tr>
</table><script type="text/javascript">
$(document).ready(function(){
$("#gmyTab01").mouseover(function(){
//alert(document.getElementById("gmyTab02").childNodes[0]) ;
alert($(this).find("div").removeClass());
$(this).find("div").removeClass();
$(this).find("div").addClass("gt-active");
$("#gmyTab02").find("div").removeClass();
$("#gmyTab02_cat_0").removeClass();
$("#gmyTab01_cat_0").show();
$("#gmyTab02_cat_0").hide();
}); $("#gmyTab02").mouseover(function(){
$(this).find("div").removeClass();
$(this).find("div").addClass("gt-active");
$("#gmyTab01").find("div").removeClass();
$("#gmyTab02_cat_0").removeClass();
$("#gmyTab02_cat_0").show();
$("#gmyTab01_cat_0").hide();
});
});
</script>
运行这些jq在ff和ie中均无问题,为什么在grome中无法正常求解决
grome给的错是698Uncaught TypeError: Object [object Object] has no method 'find'
(anonymous function)/baochem/#:698
jQuery.event.handlejquery-1.5.js:2535
jQuery.event.add.elemData.handle.eventHandle
<tr>
<td id="gmyTab01"><div class="gt-active">原油</div></td>
<td id="gmyTab02"><div>纯苯</div></td>
</tr>
</table><script type="text/javascript">
$(document).ready(function(){
$("#gmyTab01").mouseover(function(){
//alert(document.getElementById("gmyTab02").childNodes[0]) ;
alert($(this).find("div").removeClass());
$(this).find("div").removeClass();
$(this).find("div").addClass("gt-active");
$("#gmyTab02").find("div").removeClass();
$("#gmyTab02_cat_0").removeClass();
$("#gmyTab01_cat_0").show();
$("#gmyTab02_cat_0").hide();
}); $("#gmyTab02").mouseover(function(){
$(this).find("div").removeClass();
$(this).find("div").addClass("gt-active");
$("#gmyTab01").find("div").removeClass();
$("#gmyTab02_cat_0").removeClass();
$("#gmyTab02_cat_0").show();
$("#gmyTab01_cat_0").hide();
});
});
</script>
运行这些jq在ff和ie中均无问题,为什么在grome中无法正常求解决
grome给的错是698Uncaught TypeError: Object [object Object] has no method 'find'
(anonymous function)/baochem/#:698
jQuery.event.handlejquery-1.5.js:2535
jQuery.event.add.elemData.handle.eventHandle
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货