How to install cool javascript feature in WordPress?

I’m not sure I fully understand, but this isn’t the recommended way to load js in WordPress. You normally would load scripts using a special WordPress function in your theme’s functions.php file.

It’s wp_enqueue_script(). More here: http://codex.wordpress.org/Function_Reference/wp_enqueue_script

By the way, WP also has its own function that essentially is used where you might use include(). That is get_template_part(). (That wouldn’t have anything to do with the js not loading, but just pointing it out.