0

I have this checkbox that has ONLY type and name attributes. I cannot add className or id to it.

How can I check/uncheck this checkbox using jQuery?

<input type="checkbox" name="savedCcCheckbox">
thewebtud
  • 455
  • 2
  • 4
  • 21
  • 1
    Duplicate of [How can I select an element by name with jQuery?](https://stackoverflow.com/questions/1107220/how-can-i-select-an-element-by-name-with-jquery) – esqew Oct 01 '20 at 19:57
  • Not a duplicate. Wasn't asking how to SELECT an element, was asking how to MANIPULATE it. Answer is correct. – jnovack Oct 01 '20 at 20:09

1 Answers1

1

$('[name=savedCcCheckbox]').prop( "checked", true );

Esger
  • 1,310
  • 12
  • 18