애니메이션 입력 음성 거품 (여기에 거품의 CSS를 발견했습니다 : http://nicolasgallagher.com/pure-css-speech-bubbles/)을 할 때마다 마우스가 링크 위에 있습니다. div 정보 블럭을 만들고 마우스가이 div 밖으로 나왔다면 .remove()를 사용하여 삭제할 것입니다. 그러나 링크를 다른 마우스로 빠르게 움직일 때 .remove()는 첫 번째 buuble에서 작동하지 않는 것 같습니다.. 내 jQuery 함수에서 .remove()가 작동하지 않는 것 같습니다.
내 jQuery 코드는 다음과 같습니다
여기infoBubble = function(el){
setTimeout(function() {
$('body').append('<div class="infoBubble"></div>');
var bubble = $('.infoBubble:last');
var posTop = el.offset().top-el.height()-12;
var posLeft = el.offset().left+el.width()/2-bubble.width()/2;
bubble.css({ 'left':posLeft, 'top':posTop-10, 'background-color': 'rgba(0, 0, 0, 0.7)', 'opacity':1 });
bubble.html('eeeeeeeeee');
bubble.stop().animate({ 'top':posTop },200);
},400);
}
infoBubbleStop = function(){
var bubble = $('.infoBubble:last');
bubble.stop().animate({ 'opacity':0 }, 200, 'linear', function(){ bubble.remove(); });
}
$(document).on('mouseover', 'a', function() {
infoBubble($(this));
}).on('mouseout', function() {
infoBubbleStop();
});
바이올린 :
감사 돕는 많은 ... jQuery.stop() 함수의 jumpToEnd
매개 변수와
stop() 함수가 호출 될 때마다 콜백이 실행되지 않습니다. – adeneo
stop()없이 시도했지만 동일한 결과가 있습니다. –