cardh = 0
$('.cardgreen > img').hover(function() {
if (cardh == 0) {
$('.card > img').animate({ height: 150, width: 193, opacity: '1', left: 0, top: 9 }, 500);
$('.anfahrtlink').animate({ opacity: '0' }, 500).animate({ width: 0 }, 0);
$('.cardgreen > img').animate({ opacity: '0' }, 500).animate({ opacity: '1' }, 500);
cardh = 1
}
});
$('.cardgreen > img').notanymore().hover(function() {
if (cardh == 1) {
$('.cardgreen > img').animate({ opacity: '0' }, 300);
$('.anfahrtlink').animate({ width: 84 }, 0).animate({ opacity: '1' }, 500);
$('.card > img').animate({ opacity: '1' }, 300).animate({ opacity: '0', width: 0, height: 0, left: 194, top: 75}, 270);
cardh = 0
}
});
如何說jQuery:做第二件事情,當你沒有徘徊div> img了..?JQuery - 這樣做,如果你不是.hover這個div
但是當我這樣做時,它會始終激發懸停,翱翔.. – Tomkay 2010-12-08 10:52:55