Hi guys,
Thanks for your time in reading this!
Currently, I am creating a page to fundraise for cancer research and would greatly appreciate your expert advice on implementing the below HTML code into my WordPress theme. My problem is that the CSS renders fine, however, the scripts don't seem to work no matter what I try.
Original HTML:
http://pastebin.com/Ca3dyXd9
*DEMO*:
http://fredpham500.org.au/backup
I tried adding this to footer.php before wp_footer() at one stage:
<?php
wp_register_script('hoverintent_js', get_bloginfo( 'template_url' ) . '/js/jquery.hoverIntent.js', array('jquery'));
wp_enqueue_script('hoverintent_js');
wp_enqueue_script('scripts_js', get_bloginfo( 'template_url' ) . '/js/scripts.js', array('hoverintent_js'), '1.0', true);
?>
this to functions.php at another:
function init_hoverintent() {
if ( !is_admin() ) {
wp_register_script('hoverintent_js', get_bloginfo('template_url') . '/js/jquery.hoverintent.js', array('jquery'));
wp_enqueue_script('hoverintent_js');
wp_enqueue_script('scripts_js', get_bloginfo('template_url') . '/js/scripts.js', array('hoverintent_js'), "1.0", true);
}
}
add_action('template_redirect', 'init_hoverintent');
and even this to footer.php before wp_footer() in a final attempt:
<script type="text/javascript" src="http://www.fredpham500.org.au/wp-content/themes/sabuy/js/jquery.hoverIntent.js"></script>
<script type="text/javascript" src="http://www.fredpham500.org.au/wp-content/themes/sabuy/js/scripts.js"></script>
...however, all without any success.
Can someone please advise me what I am doing wrong and how I might be able to resolve this? I am certain I am close, just not quite there.
Thank you kindly for your assistance.
Many thanks,
Tam
PS. You can download Brian Cherne's fantastic jquery.hoverintent.js at this link: http://cherne.net/brian/resources/jquery.hoverIntent.html