0
我一直在圍繞模具用這一切的一天,並且不能看着辦吧......jQuery的ButtonSet()懸停狀態覆蓋
我有()利用jQuery UI的buttonset(功能)按鈕的列表和即使在我將鼠標懸停在某個按鈕之後,我仍想保留ui-active
類,但由於某種原因,jQuery UI功能會一直移除該類並從按鈕上清除高亮區(這很糟糕,因爲用戶不知道按鈕是什麼他們在)。
這是迄今爲止代碼:
function showSection(sectionIndex){
$('.listSection').hide();
$('#listSection' + sectionIndex).show();
$('.listSectionHeader.ui-state-active').each(function(){
$(this).removeClass('ui-state-active');
});
$('#listSectionHeader' + sectionIndex).addClass('ui-state-active');
}
var buttons = $("#listHeader a");
$.each(buttons, function(){
$(this).bind('mouseleave.button', function(){
if($(this).hasClass('ui-state-active'))
return;
});
});
你也可以發佈你的html代碼 – DG3 2012-02-29 21:53:22