check a checkbox with jQuery

<!DOCTYPE HTML>
<html>
<head>
<title>Check box</title>
<script
	src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
	
</script>

<script>
function function1()
{
		$('#check1').prop('checked', true);
		$('#check2').prop('checked', false);
}
</script>
</head>
<body onLoad="function1();">
	<input type="checkbox" name="check1" id="check1" value="bike">
	checked
	<br>
	<input type="checkbox" name="check2" id="check2" value="Car">
	not checked
</body>
</html>