Two click functions doing the same thing with difference the selector
Here are 3 - there are more, no doubt


Give both checkboxes a class and use that as the selector  

$(".someClass").click( ... )

Declare the event handler elsewhere, and use it anywhere:  

function checkboxClick(event) {...};  

$subparentCheckbox.click(checkboxClick);  
$childCheckbox.click(checkboxClick);

Use .add to combine the two checkboxes into one collection before calling .click like so  

$subparentCheckbox.add($childCheckbox).click(...)`