My Jquery doesn't work

Hello here is my Jquery fonction:

 <script type="text/javascript">
	 
	  $(document).ready(function(){
	

	   $("#dayss-button").click(function(){
			$(".days").prop("checked", false);
       });
  });

  </script>

Here is the code:

<div id="days" class="selector">
					  <p>Select days / A Day (One day at least)</p>
					  <input type="checkbox" name="weekday[]" value="6" class="days"> Sunday
				  &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
					  <input type="checkbox" name="weekday[]" value="0" class="days"> Monday<br><br>
					  <input type="checkbox" name="weekday[]" value="1" class="days"> Tuesday
				  &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
					  <input type="checkbox" name="weekday[]" value="2" class="days"> Wednesday<br><br>
					  <input type="checkbox" name="weekday[]" value="3" class="days"> Thursday
				  &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
					  <input type="checkbox" name="weekday[]" value="4" class="days"> Friday<br><br>
				 
 				  <button type="button" id="days-button">Clear selection</button>
			    </div><!-- End days -->

When I click the “clear selection” button nothing happens.

I added alert(“dfdfdfd”); after the $(document).ready(function(){
and when I refreshed the page the alert message showed up, so the Jquery functions generally but my function doesn’t.

Why ?

Does this look right to you ?

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.