Код: Выделить всё
var expanded = false,
checkboxes = document.getElementById("checkboxes");
function showCheckboxes() {
if (!expanded) {
checkboxes.style.display = "block";
expanded = true;
} else {
checkboxes.style.display = "none";
expanded = false;
}
}Код: Выделить всё
.multiselect {
width: 200px;
}
.selectBox {
position: relative;
}
.selectBox select {
width: 100%;
font-weight: bold;
}
.overSelect {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
#checkboxes {
display: none;
border: 1px #dadada solid;
height: 100px;
}
#checkboxes label {
display: block;
}
#checkboxes label:hover {
background-color: #1e90ff;
}
.caret {
border-top: 4px solid #919da9;
}Код: Выделить всё
Select an option
First checkbox
Second checkbox
Third checkbox
Select an option
First checkbox
Second checkbox
Third checkbox
Я думаю, что мне нужно открывать элементы по ID, но я этого не делаю не знаю, как это сделать.
Подробнее здесь: https://stackoverflow.com/questions/786 ... n-the-page
Мобильная версия