JS错误“;预期对象“;仅在IE9上
JS Error "Object expected" only on IE9
我只在IE9上得到一个错误,错误显示"SCRIPT5007:预期对象"。有两个相同的错误。一个在开始时位于$(文档),另一个标记为"此处<-error"
<script>
$(document).ready(function(){
var imagePath = "/sites/all/modules/custom/sixdegrees_right_menu/images/";
$(".menu-holder").mouseover(function()
{
//$(this).children(".menu-title").children(".menu-bg").hide();
//$(this).children(".menu-title").children(".menu-name").css({"float":"none"});
//$(this).children(".menu-title").children(".menu-text").css({"float":"none"});
var imgSrc = $(this).children(".menu-icon").find("img").attr("src");
imgSrc = imgSrc.replace(imagePath, "");
imgSrc = imagePath + "h-" + imgSrc;
$(this).children(".menu-icon").find("img").attr("src", imgSrc);
<- error here
//$(this).children(".menu-title").children(".menu-name").children("img").animate({"left": "0px"}, "slow");
//$(this).children(".menu-title").children(".menu-text").animate({"left": "0px"}, "slow");
});
});
</script>
还有一些评论行,我没有足够的权限删除它,除非我可以索赔。
在脚本标记中添加type="text/javascript",并确保在尝试使用jQuery之前成功包含jQuery。
相关文章:
- ReactJS映射:如何仅在url变量不为空时呈现html链接
- 在IE9中的输入字段中输入焦点最近按钮
- 如何使bxslider仅在移动视图中处于活动状态
- 仅在IE中,javascript中的时区名称不正确
- 单击仅在第二次单击后有效
- ng消息仅在触摸时显示错误,并在错误的初始显示上转换
- 使用JavaScript在IE9中获取数据列表选项
- 对于loop.if-仅在经过所有间隔后返回true
- Ajax模式下的Jquery Select2 V4在IE9中不起作用
- 边栏仅在单击外部时关闭单击
- 如何仅在首次登录时显示弹出窗口
- 数据属性仅在切换设备模式下工作
- Javascript:JSON请求仅在第一次工作
- ngAnimate在IE9中仅部分降级
- JS错误“;预期对象“;仅在IE9上
- 无法获取属性'替换'的未定义-仅在IE9中
- 方法compareDocumentPosition仅在IE9中不支持
- 仅在IE9中存在pop .js问题
- Microsoft JScript运行时错误:无法获取属性'的值;选中':对象为null或仅在IE9中未
- 仅在IE9标准模式下asp.net javascript内存泄漏