2015-01-07 64 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()两个动画

相关问题