- // Bind to change event, and trigger once to set the initial state of the checkboxes.
- rc.updateCheckboxes();
- $select.change( rc.updateCheckboxes );
+ // Bind to change event of the checkboxes.
+ // The initial state is already set in HTML.
+ $select.on( 'change', rc.updateCheckboxes );