Home  >  Article  >  Web Front-end  >  How to make Materialize CSS checkbox work with @Html.CheckBoxFor?

How to make Materialize CSS checkbox work with @Html.CheckBoxFor?

PHPz
PHPzforward
2023-08-29 17:57:061070browse

如何使Materialize CSS复选框与@Html.CheckBoxFor一起工作?

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!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete