我正在http://www.gablabelle.com上建立一个网站,当您单击图像缩略图时,它会在淡出之前闪烁……但这仅适用于 Google Chrome,而不适用于 Firefox 和 Safari。
什么可能导致这种情况,我有办法解决这个问题吗?
<div id="streamwrapper">
<div id="sidebar">
</div>
<div id="stream">
<article id="509">
<a class="ajaxed" href="#"><img src="#" alt="" /></a>
</article>
</div>
</div>
...
$("a.ajaxed").on("click",function(event) {
event.preventDefault();
postid = $(this).parent().attr("id");
$("#streamwrapper").fadeOut(1000, function(){
$.ajax({
type: "POST",
dataType: "JSON",
url: ajax_object.ajaxurl,
data: ({
action : "get_all_images",
post_id: postid
}),
success:function(data){
$("#post-container").append(data);
},
error:function(data){
console.log(data);
}
});
});
return false;
});