Ive seen all the documentation in the codex but I am doing something wrong since it doesnt work!
I want to implement this jquery plugin (https://github.com/davidcrawford/typist-jquery) in my welcome page (www.english.intermediavs.com)
Ive added this code in my function.php
function my_typist() {
if (!is_admin()) {
wp_enqueue_script('jquery');
wp_enqueue_script('jquery.typist', get_bloginfo('template_url') . '/wp-includes/js/jquery.typist.js', array('jquery'), '1.0', true);
}
}
add_action('init', 'my_typist');
And I also introduced this code in "welcome page" by using html raw plugin.
<!--raw-->
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/wp-includes/js/jquery.typist.js">
jQuery(document).ready(function($) {
$('#terminal').typist({
height: 300
});
$('#terminal').typist('prompt')
.wait(1500)
.typist('type', 'greet')
.typist('echo', 'Hello, world!')
});
</script>
<!--/raw-->
PS: I am using the plugin Use Google libraries as well.
Thanks in adavance!
links: http://codex.wordpress.org/Using_Javascript
http://codex.wordpress.org/Function_Reference/wp_enqueue_script
front-page.phptemplate file? – Chip Bennett Dec 6 '12 at 13:47