Sumo select - 如何让加载的列表框始终打开?

Sumo select - how to make the listbox be loaded always open?

如何让加载的列表框一直打开?点赞用户点击?

您可以简单地将 class open 添加到相扑元素中,例如:

$('.SumoSelect').addClass('open');

或根据您的 select select 或喜欢 :

$('you_select_selector').parent().find('.optWrapper.multiple').addClass('open');

$('#island').SumoSelect({
  placeholder: "TestPlaceholder"
});

$('.SumoSelect').addClass('open');
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://cdn.rawgit.com/HemantNegi/jquery.sumoselect/6c94c948/sumoselect.css" rel="stylesheet" />
<script src="https://cdn.rawgit.com/HemantNegi/jquery.sumoselect/master/jquery.sumoselect.js"></script>

<select id="island" multiple class="test">
  <option value="Big Island">Big Island</option>
  <option value="Oahu">Oahu</option>
  <option value="Kauai">Kauai</option>
  <option value="Maui">Maui</option>
</select>

我在添加选项后遇到问题:jQuery ('.SumoSelect')。添加类('open'); asp: 列表框始终按预期打开,但是当用户单击列表中的项目时,它不会 select(不 select 任何项目),示例除外你把上面

我的代码:

<script src="/js/Alex/jquery.sumoselect.min.js" type="text/javascript"></script>

      <script type="text/javascript">
             jQuery(document).ready(function () {
                jQuery(<%=lstBoxClientes.ClientID%>).SumoSelect({ search: true, searchText: 'Pesquise...' });                                                              jQuery('.SumoSelect').addClass('open');
                  });                                                 
      </script>        


  <asp:listbox runat="server" id="lstBoxClientes" selectionmode="single" DataSourceID="dsclientes" 
    DataTextField="cliente"  DataValueField="clienteid">
      </asp:listbox>