So I followed this toturial (http://www.gmarwaha.com/blog/2007/08/23/lavalamp-for-jquery-lovers/?cp=39#comments) to impliment a Lavalamp jQuery effect and I can't seem to get it to work.. I followed these instructions carefully and now I'm so frustrated that my code is just bouncing off my screen and my mind is scrambled. Can someone please tell me what I'm doing wrong here? Let me post my exact code.
This is the script code for Lavalamp in my HTML:
<head>
<title>A Perfect Circle Band Website</title>
<link rel="stylesheet" href="images/NewHorizon.css" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.lavalamp.js"></script>
<script type="text/javascript" src="js/jquery.easing.js"></script>
<script type="text/javascript">
$(function() { $(".lavaLamp").lavaLamp({ fx: "backout", speed: 700 })});
</script>
<title>New Horizon</title>
</head>
<body>
~~~~~~~~~~
This is my HTML code for Lavalamp:
<div id="header_bottom">
<div id="main_links">
<ul class="lavaLamp">
<li><a href="#">Home</a></li>
<li><a href="#">Plant a tree</a></li>
<li><a href="#">Travel</a></li>
<li><a href="#">Ride an elephant</a></li>
</ul>
</div>
</div>
~~~~~~~~~~
And this is my code for Lavalamp in my CSS:
.lavaLamp {
position: relative;
height: 29px; width: 421px;
background: url("../image/bg.gif") no-repeat top;
padding: 15px; margin: 10px 0;
overflow: hidden;
}
/* Force the list to flow horizontally */
.lavaLamp li {
float: left;
list-style: none;
}
/* Represents the background of the highlighted menu-item. */
.lavaLamp li.back {
background: url("../image/lava.gif") no-repeat right -30px;
width: 9px; height: 30px;
z-index: 8;
position: absolute;
}
.lavaLamp li.back .left {
background: url("../image/lava.gif") no-repeat top left;
height: 30px;
margin-right: 9px;
}
/* Styles for each menu-item. */
.lavaLamp li a {
position: relative; overflow: hidden;
text-decoration: none;
text-transform: uppercase;
font: bold 14px arial;
color: #fff; outline: none;
text-align: center;
height: 30px; top: 7px;
z-index: 10; letter-spacing: 0;
float: left; display: block;
margin: auto 10px;
}
~~~~~~~~~~
Incase you're wondering, I do have the appropriate .js files in a "js" folder in my "main" folder which has my html document. I'm so frustrated trying to work this code, I don't know what I'm really doing to be honest.
I attached an image file to show you guys what the Lavalamp currently looks like on my page, and another image to show what I want it to look like. Please don't mind that my divs are unaligned and scrambled, I'm in the process of fixing it.