Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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!! :)

share|improve this question
    
You should enqueue your scripts and also check for errors or debug the js in firebug or chrome inspect. –  Wyck Oct 13 '11 at 5:39
    
Closed-voted as exact duplicate. Picked the question linked above, but really, there are several from which to choose. –  Chip Bennett Feb 24 '12 at 13:06
add comment

marked as duplicate by Chip Bennett, EAMann Feb 24 '12 at 15:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

<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>
share|improve this answer
add comment

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