Why doesn’t my very simple jQuery work?

The code seems fine. Please check by loading the script in the footer and also use the wp_footer in your .php file.