Home >>jQuery Tutorial >jQuery checkbox Selector

jQuery checkbox Selector

jQuery checkbox Selector

jQuery checkbox selector in jQuery is used to selects input elements with type=checkbox.

Here is an Example of jQuery :checkbox Selector

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
$(":checkbox").wrap("<span style='background-color:#c0ed1f'>");
<form action="">
Name: <input type="text" name="user"><br>
checkbox 1: <input type="checkbox" name="vehicle" value="Bike"><br>
checkbox 2: <input type="checkbox" name="vehicle" value="Car"><br>
checkbox 3: <input type="checkbox" name="vehicle" value="Airplane"><br>
<input type="submit">

checkbox 1:
checkbox 2:
checkbox 3: