如果禁用select标记,是否有方法在heapbox上应用类?
<select name="select-name" id="select-id" disabled>发布于 2014-04-24 23:44:16
由于Heapbox没有这样的特性,我就是这样做的:
$("select").each(function () {
if($(this).is(':disabled')){
$(this).wrapAll(" <div class='select--disabled'></div>");
}
});
$('select').heapbox();然后使用css:
.select--disabled .heapBox{
cursor: default;
pointer-events: none;
}
.select--disabled .holder{
/* Style for the disabled state */
background-color: #404040;
box-shadow: none;
color: #5A5A5A;
}发布于 2014-04-24 23:32:49
不,不能覆盖被css类禁用的。使用javascript更改“禁用”为“启用”。$(‘#select-id’).prop(“禁用”,false);
https://stackoverflow.com/questions/23281677
复制相似问题