2015-01-07 59 views
0

我好奇,是否可以計算切換?因爲我遇到了一個問題,當我將鼠標懸停並懸停多次並選擇其中一個項目時,該按鈕將會推到底部而無法看到。或者這是解決這個問題的另一種方法?甚至是否可以計算切換?

更新

不是多次我將鼠標懸停在和懸停並再次懸停它也推至底部。

click here for js fiddle

JS

 $("#popup_survey_whitebox").hover(function() { 
     $('#popup_survey_whitebox_content').stop().animate({ 
      opacity: 1, 
      height: "toggle" 
     }, 500, function() { 
      $("label#popup_survey_label_title").text(orig); // Here put the original text. 

     }).css('position', 'relative'); 

    }, function() { 
     $('#popup_survey_whitebox_content').stop().animate({ 
      opacity: 1, 
      height: "toggle" 
     }, 500, function() { 
      $("label#popup_survey_label_title").text(newText); // Here put the new text with "..." 

     }).css('position', 'relative'); 
    }); 

enter image description here

enter image description here

+0

無法複製的問題提到? – Mritunjay

+0

@Mritunjay你是什麼意思? –

+0

你的問題不清楚。你不能確切地看到什麼?什麼按鈕被推到底部?你提供的小提琴沒有看到這種效果。 – Aditya

回答

0

最後,我找到了一種方法來修復這個問題。

 $("#popup_survey_whitebox").hover(function() { 
    $('#popup_survey_whitebox_content').finish().animate({ 
     opacity: 1, 
     height: "toggle" 
    }, 500, function() { 
     $("label#popup_survey_label_title").text(orig); // Here put the original text. 

    }).css('position', 'relative'); 

}, function() { 
    $('#popup_survey_whitebox_content').finish().animate({ 
     opacity: 1, 
     height: "toggle" 
    }, 500, function() { 
     $("label#popup_survey_label_title").text(newText); // Here put the new text with "..." 

    }).css('position', 'relative'); 
}); 

變化$('#popup_survey_whitebox_content').stop()$('#popup_survey_whitebox_content').finish()兩個動畫

相關問題