<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>collapsible demo</title>
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<script>
$(document).ready(function(){
$("#cb-mlb-all").change(function(){
$(".cb-mlb").prop('checked', $(this).prop("checked"));
});
});
</script>
</head>
<body>
<form>
<div class="ui-field-contain">
<fieldset>
<div class="ui-input-form">
<ul class="chk-container">
<label for="cb-mlb-all">Select all<input type="checkbox" value="" id="cb-mlb-all" /></label>
<label for="cb-mlb-ar">Arizona<input class="cb-mlb" type="checkbox" value="" id="cb-mlb-ar" /></label>
<label for="cb-mlb-at">Atlanta<input class="cb-mlb" type="checkbox" value="" id="cb-mlb-at" /></label>
</ul>
</div>
</fieldset>
</div>
</form>
</body>
</html>
Adding the Label tags around the checkboxes makes the output look better, however now the Select All checkbox does not cause the other checkboxs to get checked / unchecked like they did without the Label tags.