Topic: How to disable MDB checkbox?
waynefulcher
pro
asked 7 years ago
I need to be able to use either the standard checkbox or the library I had been using which is Pretty Checkbox.
I can override the css and make my own checkbox if I need to but I can't figure out how to allow user to click on it again, it seems MDB has taken over the click event.
What I have done so far is "not" put any of the class names in the MDB documentation and then override the following CSS:
input[type='checkbox'],
input[type='checkbox']:checked,
input[type='checkbox']:not(:checked)
{
-webkit-appearance:none;
width: 14px;
height: 14px;
background: #FFFFFF;
border-radius: 5px;
border: 1px solid #555;
opacity: 1;
z-index: 0;
position: unset;
}
input[type='checkbox']:checked {
background: #4285f4;
}
But again when I click on the actual checkbox my click event does not fire.
Thanks
nextstepmedia
pro
answered 7 years ago
input[type='checkbox'], input[type='checkbox']:checked, input[type='checkbox']:not(:checked) {
display: inline-block;
position: relative;
pointer-events: auto;
opacity: 1;
}
Piotr Glejzer
staff
answered 7 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No