The only way to concretize a CSS checkbox for use with Html.checkbox without making the left checkbox disappear is to move the hidden element to the bottom of the parent element .
$("input[type='hidden']").each(checkbox1 (0,IsActive ) { $(this).appendTo($(IsActive).parent()); });
In this hidden element, the IsActive is placed at the bottom of the parent element, thus eliminating the disappearance of the left checkbox, thereby materializing the CSS checkbox to go with HTML.checkbox use.
The above is the detailed content of How to make Materialize CSS checkbox work with @Html.CheckBoxFor?. For more information, please follow other related articles on the PHP Chinese website!