0

Possible Duplicate:
wp_enqueue_script isn't connecting my custom js file

I am having a heck of a time getting this Lavalamp effect to work on my main menu/navigation.

Here is what I have placed in the head tags:

<script language=""javascript"" type=""text/javascript"src="wp-content/themes/metric /scripts/jquery-1.4.1.min.js"></script>
<link rel="stylesheet" href="wp-content/themes/metric/lavalamp.css" type="text/css" media="screen" />
<script type=""text/javascript"" src="wp-content/themes/metric/scripts/jquery.easing.min.js"></script>
<script type=""text/javascript"" src="wp-content/themes/metric/scripts/jquery.lavalamp.min.js"></script>

<!-- this script initiates the function change the #nav to your unordered list's ID -->
<script type=""text/javascript"">
$(function() {
$("#nav").lavaLamp({
fx: "backout",
speed: 700,
click: function(event, menuItem) {
return true;
}
});
});
</script>

I have made sure that my ID is the same as listed above in the code #nav. However, it isn't working and i've hit a brick wall after trying a few different combinations.

Any help you guys could give would be much appreciated!! :)

2
  • You should enqueue your scripts and also check for errors or debug the js in firebug or chrome inspect.
    – Wyck
    Commented Oct 13, 2011 at 5:39
  • Closed-voted as exact duplicate. Picked the question linked above, but really, there are several from which to choose. Commented Feb 24, 2012 at 13:06

1 Answer 1

0
<script language="javascript" type="text/javascript" src="wp-content/themes/metric /scripts/jquery-1.4.1.min.js"></script>
<link rel="stylesheet" href="wp-content/themes/metric/lavalamp.css" type="text/css" media="screen" />
<script type="text/javascript" src="wp-content/themes/metric/scripts/jquery.easing.min.js"></script>
<script type="text/javascript" src="wp-content/themes/metric/scripts/jquery.lavalamp.min.js"></script>



<script type="text/javascript">
    jQuery(function() {
    jQuery('#nav').lavaLamp({
    fx: 'backout',
    speed: 700,
    click: function(event, menuItem) {
    return true;
    }
    });
    });
    </script>

Not the answer you're looking for? Browse other questions tagged or ask your own question.