hover을 사용해보십시오. 동일한 기능에서 mousein 및 mouseout 이벤트를 지정할 수 있다는 이점이 있습니다. 호버 이벤트에 적용한 내용을 적용하는 방법에 대한 도움이 필요하면 의견을 말하면 내가 할 수있는 것을 확인할 수 있습니다.
편집 :
좋아, 귀하의 사이트에 코드가 이미이
//On mouse over those thumbnail
$('.zitem').hover(function() {
//Set the width and height according to the zoom percentage
width = $('.zitem').width() * zoom;
height = $('.zitem').height() * zoom;
//Move and zoom the image
$(this).find('a img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:200});
//Display the caption
$(this).find('div.caption').stop(false,true).fadeIn(200);
},
function() {
//Reset the image
$(this).find('a img').stop(false,true).animate({'width':$('.zitem').width(), 'height':$('.zitem').height(), 'top':'0', 'left':'0'}, {duration:100});
//Hide the caption
$(this).find('div.caption').stop(false,true).fadeOut(200);
});
난 당신이 원하는 일을이 코드에 두 줄을 추가하는거야있다
//On mouse over those thumbnail
$('.zitem').hover(function() {
//Set the width and height according to the zoom percentage
width = $('.zitem').width() * zoom;
height = $('.zitem').height() * zoom;
//Move and zoom the image
$(this).find('a img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:200});
//Change the header colour
$(this).siblings('h2').animate({'color':'#111111'},250,'linear');
//Display the caption
$(this).find('div.caption').stop(false,true).fadeIn(200);
},
function() {
//Reset the image
$(this).find('a img').stop(false,true).animate({'width':$('.zitem').width(), 'height':$('.zitem').height(), 'top':'0', 'left':'0'}, {duration:100});
//Change the header colour back
$(this).siblings('h2').animate({'color':'#EE4E07'},250,'linear');
//Hide the caption
$(this).find('div.caption').stop(false,true).fadeOut(200);
});
그럴거야
네, 감사합니다. 도움이 필요하십니까? 코드 줄을 생성하고 복제 할 수 있다고 생각하십니까? 고마워요. – JCHASE11
Ok. 그것을 고치기 위해 내가 할 몇 가지 다른 것들이 있습니다. 끝나면 약 5 분 후에 게시하겠습니다. – Gausie
솔루션을 찾으려면 편집을 참조하십시오. – Gausie