Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Toggle checkboxes [CodePen included]

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #42957
    darrylm
    Member

    I have a checkbox that when checked should toggle checkboxes in a form below.

    The function works perfectly on first iteration, however any time after that the checkboxes in the form are not checked.

    I’ve included a simplified version of my code in the CodePen below

    http://codepen.io/anon/pen/hldDI

    #125943
    darrylm
    Member

    Solved, simply replace the attr function with prop and it will work as expected.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.