所以我有一个jquery Multiple Select Dropdownbox(下拉框内的复选框)
我试图实现它 ,以便它看起来像一个菜单,将在提供的div上悬停时弹出。所以这是我的代码
ASP 代码:
<div class="box">
SORT?
<div class="hiddencolumn" style="position: absolute; background-color:Black; height:auto;">
<asp:DropDownList ID="CompanyDropDownList" Class="s10" runat="server" AppendDataBoundItems="True">
</asp:DropDownList>
<br />
<asp:DropDownList ID="RegionDropDownList" Class="s10" runat="server" AppendDataBoundItems="True">
</asp:DropDownList>
<br />
<asp:DropDownList ID="AreaDropDownList" Class="s10" runat="server" AppendDataBoundItems="True">
</asp:DropDownList>
<br />
<asp:DropDownList ID="BranchDropDownList" Class="s10" runat="server" AppendDataBoundItems="True">
</asp:DropDownList>
<br />
<asp:DropDownList ID="StorageGroupDropDownList" Class="s10" runat="server" AppendDataBoundItems="True">
</asp:DropDownList>
<br />
<asp:DropDownList ID="SORDropDownList" Class="s10" runat="server" AppendDataBoundItems="True">
</asp:DropDownList>
<br />
<asp:DropDownList ID="TicketDropDownList" Class="s10" runat="server" AppendDataBoundItems="True">
</asp:DropDownList>
<br />
<asp:DropDownList ID="KaratDropDownList" Class="s10" runat="server" AppendDataBoundItems="True">
</asp:DropDownList>
<br />
<asp:DropDownList ID="PORIGINDropDownList" Class="s10" runat="server" AppendDataBoundItems="True">
</asp:DropDownList>
<br />
<asp:DropDownList ID="StatusDropDownList" Class="s10" runat="server" AppendDataBoundItems="True">
</asp:DropDownList>
<br />
<asp:DropDownList ID="ClassificationsDropDownList" Class="s10" runat="server" AppendDataBoundItems="True">
</asp:DropDownList>
<br />
<asp:Button ID="SortButton" runat="server" Text="Sort" OnClick="SortButton_Click" />
</div>
</div>
JavaScript For 框下拉清单和悬停淡入淡出
<script language="javascript" type="text/javascript">
$(document).ready(function()
{
$(".s10").dropdownchecklist( { firstItemChecksAll: true,forceMultiple: true, onComplete: function(selector) {
var values = "";
for( i=0; i < selector.options.length; i++ ) {
if (selector.options[i].selected && (selector.options[i].value != "")) {
if ( values != "" ) values += ";";
values += selector.options[i].value;
}
}
alert( values );
} });
$(function(){
$(".box").hover(function(){
$(this).find(".hiddencolumn").fadeIn();
}
,function(){
$(this).find(".hiddencolumn").fadeOut();
}
);
});
});
</script>
CSS
.hiddencolumn
{
display: none;
}
当我删除 Div 上的 Hidden 列类(例如删除display:none;
)时,
渲染是正确
的,如下所示:问题是当我添加hiddenColumn
Class 或添加display:none
到 div 时,这就是渲染
有什么帮助吗?或解决?任何指南将不胜感激。