0
以下图像交换代码在IE7中不起作用。我试过每一次都无济于事。jQuery脚本不能在IE7(HTML5文档类型)中工作
在这里工作示例:http://www.bcsstaging.com/lamaze-intimates/bras.php
这里是jQuery的
$(document).ready(function() {
//Setup each produce switcher on the page
$(".item").each(function(){
$(this).find(".preview .thumbnails").show();
var imgTitle = $(this).find(".thumbnails img:first-child").attr("title");
$(this).find("a:first").addClass("active");
$(this).find(".caption").html(imgTitle);
});
//Update Image on Click
$(".thumbnails a img").click(function(){
var navParent = $(this).parent().parent();
var itemParent = $(this).parent().parent().parent();
var imgTitle = $(this).attr("title");
var previewImg = $(itemParent).find("img.main");
var link = $(this).parent();
var linkHref = link.attr("href");
var linkAlt = link.attr("alt");
if($(link).hasClass("active") == false)
{
$(navParent).find("a").removeClass("active");
link.addClass("active");
$(previewImg).animate({
opacity: 0.8,
}, 300, function() {
if(imgTitle != "") $(itemParent).find(".caption").html(imgTitle);
previewImg.attr("src", linkHref);
previewImg.attr("alt", linkAlt);
$(this).animate({
opacity: 1,
}, 300
);
});
}
return false;
});
$("input").click(function(){
$("p.more").fadeIn("slow");
})
});
试试这个'.ie7 * {不透明度:继承;过滤器:继承; }' – undefined 2012-04-26 00:14:45
尝试在不透明度声明(例如将“不透明度:0.8”更改为“不透明度:0.8”)后删除逗号。 IE对这些事情很敏感。您是否在开发控制台中看到任何错误? – ingo 2012-04-26 00:17:32
@Raminson不幸的是,它并没有这样做。谢谢您的帮助! – 2012-04-26 00:19:40