I reduced my code down to producing an alert when the DOM was ready, but still it threw the error:
Error: $ is not a function
If there is no Page Template option when writing or editing a Page it may because there is no template file with the proper structure. For the Page Template box to be available to assign to a Page there must be a least one template file in your theme that has a structure at the beginning of the template file that looks like this:
<?php /* Template Name: Links */ ?>
That example is from the WordPress Default themes wp-content/themes/default/links.php file, so replace Links with your desired template name.