在我的网站上,这些框应该淡入描述中。这适用于我尝试过的所有浏览器,除了 IE10。这是一个 WordPress 网站,我使用了九个插件。我试过停用所有插件,但悬停在 IE10 中仍然不起作用。
下面是我用于悬停的代码:
jQuery(document).ready(function($){
$('.thumbnail').hover(function() {
$('img', this).stop(true,true).fadeTo(100, 0.1);
$('.description', this).stop(true,true).fadeIn(100);
}, function() {
$('img', this).stop(true,true).fadeTo(100, 1);
$('.description', this).stop(true,true).fadeOut(100);
});
});
有人可以帮我找出问题吗?如果我遗漏了任何重要信息,请告诉我。谢谢你。
编辑:过滤/悬停的整个代码。
// Filter
$(function() {
var time_effect = 1000;
var effect_name = 'easeOutQuart';
$('.all').quicksand( $('.everything article'), {
duration: time_effect,
attribute: 'data-id',
easing: effect_name,
adjustHeight: 'auto',
useScaling: false
}, function() { // callback function
$("a.single-image").fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'fade',
'overlayColor' : '#000',
'overlayOpacity' : '0.6'
});
$(document.body)
.on('mouseenter', '.thumbnail', function() {
$('img', this).stop(true,true).fadeTo(600, 0);
$('.description', this).stop(true,true).fadeIn(600);
})
.on('mouseleave', '.thumbnail', function() {
$('img', this).stop(true,true).fadeTo(600, 1);
$('.description', this).stop(true,true).fadeOut(600);
});
$("body.blog #content article:last, body.archive #content article:last, body.search-results #content article:last").addClass("last");
});
$('.btn_all').click(function(e) {
$('.all').quicksand( $('.everything article'), {
duration: time_effect,
attribute: 'data-id',
easing: effect_name,
adjustHeight: 'auto',
useScaling: false
}, function() { // callback function
$("a.single-image").fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'fade',
'overlayColor' : '#000',
'overlayOpacity' : '0.6'
});
$(document.body)
.on('mouseenter', '.thumbnail', function() {
$('img', this).stop(true,true).fadeTo(600, 0);
$('.description', this).stop(true,true).fadeIn(600);
})
.on('mouseleave', '.thumbnail', function() {
$('img', this).stop(true,true).fadeTo(600, 1);
$('.description', this).stop(true,true).fadeOut(600);
});
$("body.blog #content article:last, body.archive #content article:last, body.search-results #content article:last").addClass("last");
});
$('.button_box a').removeClass('selected');
$(this).addClass('selected');
e.preventDefault();
});
$('.btn_identity').click(function(e) {
$('.all').quicksand( $('.identity article'), {
duration: time_effect,
attribute: 'data-id',
easing: effect_name,
adjustHeight: 'auto',
useScaling: false
}, function() { // callback function
$("a.single-image").fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'fade',
'overlayColor' : '#000',
'overlayOpacity' : '0.6'
});
$(document.body)
.on('mouseenter', '.thumbnail', function() {
$('img', this).stop(true,true).fadeTo(600, 0);
$('.description', this).stop(true,true).fadeIn(600);
})
.on('mouseleave', '.thumbnail', function() {
$('img', this).stop(true,true).fadeTo(600, 1);
$('.description', this).stop(true,true).fadeOut(600);
});
$("body.blog #content article:last, body.archive #content article:last, body.search-results #content article:last").addClass("last");
});
$('.button_box a').removeClass('selected');
$(this).addClass('selected');
e.preventDefault();
});
$('.btn_web').click(function(e) {
$('.all').quicksand( $('.web article'), {
duration: time_effect,
attribute: 'data-id',
easing: effect_name,
adjustHeight: 'auto',
useScaling: false
}, function() { // callback function
$("a.single-image").fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'fade',
'overlayColor' : '#000',
'overlayOpacity' : '0.6'
});
$(document.body)
.on('mouseenter', '.thumbnail', function() {
$('img', this).stop(true,true).fadeTo(600, 0);
$('.description', this).stop(true,true).fadeIn(600);
})
.on('mouseleave', '.thumbnail', function() {
$('img', this).stop(true,true).fadeTo(600, 1);
$('.description', this).stop(true,true).fadeOut(600);
});
$("body.blog #content article:last, body.archive #content article:last, body.search-results #content article:last").addClass("last");
});
$('.button_box a').removeClass('selected');
$(this).addClass('selected');
e.preventDefault();
});
$('.btn_illustration').click(function(e) {
$('.all').quicksand( $('.illustration article'), {
duration: time_effect,
attribute: 'data-id',
easing: effect_name,
adjustHeight: 'auto',
useScaling: false
}, function() { // callback function
$("a.single-image").fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'fade',
'overlayColor' : '#000',
'overlayOpacity' : '0.6'
});
$(document.body)
.on('mouseenter', '.thumbnail', function() {
$('img', this).stop(true,true).fadeTo(600, 0);
$('.description', this).stop(true,true).fadeIn(600);
})
.on('mouseleave', '.thumbnail', function() {
$('img', this).stop(true,true).fadeTo(600, 1);
$('.description', this).stop(true,true).fadeOut(600);
});
$("body.blog #content article:last, body.archive #content article:last, body.search-results #content article:last").addClass("last");
});
$('.button_box a').removeClass('selected');
$(this).addClass('selected');
e.preventDefault();
});
$('.btn_print').click(function(e) {
$('.all').quicksand( $('.print article'), {
duration: time_effect,
attribute: 'data-id',
easing: effect_name,
adjustHeight: 'auto',
useScaling: false
}, function() { // callback function
$("a.single-image").fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'fade',
'overlayColor' : '#000',
'overlayOpacity' : '0.6'
});
$(document.body)
.on('mouseenter', '.thumbnail', function() {
$('img', this).stop(true,true).fadeTo(600, 0);
$('.description', this).stop(true,true).fadeIn(600);
})
.on('mouseleave', '.thumbnail', function() {
$('img', this).stop(true,true).fadeTo(600, 1);
$('.description', this).stop(true,true).fadeOut(600);
});
$("body.blog #content article:last, body.archive #content article:last, body.search-results #content article:last").addClass("last");
});
$('.button_box a').removeClass('selected');
$(this).addClass('selected');
e.preventDefault();
});
});