解决ecshop中JQ效果冲突问题
1、把下面这JS代码放到transport.js 的最底部;
if (Object.prototype.toJSONString){
var oldToJSONString = Object.toJSONString;
Object.prototype.toJSONString = function(){
if (arguments.length > 0){
return false;
}else{
return oldToJSONString.apply(this, arguments);
}
}
}
2、里面,然后配合 用jquery-1.4.2.js 别用1.3.2的
3、只要用到jquery你就带上transport.js
4、主要问题是在你用jquery的时候,可能直接用$代替了jquery??
在JS最前面加jQuery.noConflict();
再把chengjQuery替换$
例如:
<script type="text/javascript">
<script type="text/javascript">
$("#tabhot A").each(function(i){
$(this).mouseover(function(){
$("#tabhot A").each(function(){this.className = this.className.replace("_","")});
$(this).attr("class",this.className+"_");
$("#hot_txt>DIV").hide().eq(i).show();
});
});
</script>
改成:
<script type="text/javascript">
jQuery.noConflict();
jQuery("#tabhot A").each(function(i){
jQuery(this).mouseover(function(){
jQuery("#tabhot A").each(function(){this.className = this.className.replace("_","")});
jQuery(this).attr("class",this.className+"_");
jQuery("#hot_txt>DIV").hide().eq(i).show();
});
});
</script>