jQuery.js中第116行的参数无效!
这是我的脚本获取颜色标签!在Firefox中有效,但在IE中显示错误jQuery.js中第116行的参数无效!,jquery,Jquery,这是我的脚本获取颜色标签!在Firefox中有效,但在IE中显示错误 <code> document.documentElement.className += 'js_active'; jQuery.noConflict(); jQuery(document).ready(function(){ jQuery(".color_tag_cloud a").each(function(){ var links = jQuery(this).attr("href");
<code>
document.documentElement.className += 'js_active';
jQuery.noConflict();
jQuery(document).ready(function(){
jQuery(".color_tag_cloud a").each(function(){
var links = jQuery(this).attr("href");
jQuery(this).removeAttr("title");
jQuery(this).attr("title",jQuery(this).text());
if(links.indexOf("?")!=-1){
var query =links.split("=")[1];
var str = "#".concat(query);
jQuery(this).css("background",str);
}else{
var color = links.split("colors/")[1];
var query = color.split("/")[0];
var str = "#".concat(query);
jQuery(this).css("background",str);
}
});
jQuery(".color_tag_cloud a").hover( function() {
jQuery(this).stop().animate({"opacity": "0.2"}, "slow");
},function() {
jQuery(this).stop().animate({"opacity": "1"}, "slow");
});
});
我的html是这样的
<code><div class="color_tag_cloud">
<a href="http://www.freecssshowcase.com/colors/e30074/">PINK</a>
.......
</div>
</code>
.......
您的脚本正在使用jQuery的css
方法设置一些无效的十六进制颜色代码,IE对此表示不满
记录str
变量的值,您将看到:
在IE中调试,它似乎发生在
jQuery(“.color\u tag\u cloud a”)的第三次迭代中。每个循环。我看不出第三个链接有什么问题。。。