sumoselect 多个下拉列表在页面加载时闪烁
Posted
技术标签:
【中文标题】sumoselect 多个下拉列表在页面加载时闪烁【英文标题】:sumoselect multiple dropdownlist is flickring on page load 【发布时间】:2018-04-14 22:47:57 【问题描述】:您好,我正在使用sumoselect 带有复选框的下拉列表,它在 IE 浏览器上工作正常并且没有闪烁,但在 chrome 浏览器上,当第一次加载页面或刷新页面时它会闪烁任何人解决我的问题解决这个问题。我附上代码。
<script type="text/javascript">
$(document).ready(function ()
window.searchSelAll = $('.search-box-open-up').SumoSelect( csvDispCount: 3, selectAll: true, search: true, searchText: 'Enter here.', up: false );
);
</script>
<link href="css/sumoselect.css" rel="stylesheet" />
【问题讨论】:
【参考方案1】:如果不行就用这个
<style type="text/css">
.hideAll
visibility:hidden;
</style>
<script type="text/javascript">
$(window).load(function ()
$("#mytab").removeClass("hideAll");
);
</script>
<div id="mytab" class="hideAll">
--Your Content here----
</div>
【讨论】:
【参考方案2】: simply i have been put set display: none and call the j query show at the end of html DOM it will work for me.Here i am attach example.
<head>
<script type="text/javascript" src="js/jquery.sumoselect.js"></script>
</head>
<div id="div1" runat="server" class="col" style="display: none;">
<table class="table table-bordered" style="margin-bottom: 0; background-color: #FFF; border: 2px solid black;">
<tr>
<td id="tdcompany1" runat="server">Select Company : </td>
<td id="tdcompany" runat="server" colspan="4">
<p data-tooltip data-tooltip-message="Please select company name to filter">
<asp:DropDownList ID="ddlCompany" runat="server" AutoPostBack="True" Width="370px" onchange="StartProgressBar();" OnSelectedIndexChanged="ddlCompany_SelectedIndexChanged" CssClass="input-block-level">
</asp:DropDownList>
</p>
</td> </tr>
</table>
<script type="text/javascript">
$(document).ready(function ()
$('.col').show(); // changed this line
);
</script>
【讨论】:
以上是关于sumoselect 多个下拉列表在页面加载时闪烁的主要内容,如果未能解决你的问题,请参考以下文章
有没有办法在 jquery 中克隆 sumoselect 下拉菜单