Aside from @Tareq answer (which is your main problem), you should
wp_register_script
and thewp_enqueue_script
- load your local copy of jQuery instead of the one from Google CDN
- localize your script using
wp_localize_script
Aside from @Tareq answer (which is your main problem), you should
wp_register_script
and the wp_enqueue_script
wp_localize_script