简体   繁体   English

SumoSelect不显示复选框或允许(多个或单个)选择

[英]SumoSelect not displaying checkboxes or allow (multiple or single ) selections

SumoSelect will not display the checkboxes next to option names, nor will it properly select a single (or multiple) options. SumoSelect将不会在选项名称旁边显示复选框,也不会正确选择单个(或多个)选项。 (However, when I remove the multiple attribute, it is able to select a single item.) (但是,当我删除multiple属性时,它可以选择一个项目。)

https://imgur.com/bHIlY0s

<select id="w3sf-input-category" name="category[]"  multiple="multiple"></select>

$(document).ready(function (){ 
  $("#w3sf-input-category").SumoSelect({ search: true, });
});

I found the problem. 我发现了问题。 My stylsheet was overriding SumoSelect's CSS. 我的样式表覆盖了SumoSelect的CSS。

I had... #sidebar li { padding:0; 我有... #sidebar li {padding:0; } }

But I changed it to... #sidebar > li (which is limited to the first, direct decendent of the #sidebar). 但是我将其更改为... #sidebar> li(仅限于#sidebar的第一个直接后退)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM