error:$("#menu ul.menu").lavalamp is not a function
dear all..i have a problem. at firebug show: $("#menu ul.menu").lavaLamp is not a function at menu.js
the hover at menu not show. this problem show after i put this:
<style type="text/css">
* { margin:0 auto;
padding:0;
}
body{
weigth:800px;
overflow:auto;
}
div#menu {
margin:40px 0 0 95px;
text-align:center;
position:absolute;
开发者_如何转开发 }
div#menu span {
font-size:22px;
padding-left:14px;
}
div#copyright {
font:11px 'Trebuchet MS';
color:#fff;
text-align:center;
clear:left;
position:absolute;
top:546px;
width:560px;
}
div#copyright a { color:#fff; }
div#copyright a:hover { color:#fff; }
</style>
<div id="menu">
<ul class="menu">
<li><a href="index1.php" class="parent"><span>Home</span></a></li>
<li><a href="#" class="parent"><span>Inspection</span></a>
<div>
<ul>
<li><a href="inspection_report1.php#tabs-1"><span>Inspection Report</span></a></li>
<li><a href="inspection_report1.php#tabs-2"><span>Input Data</span></a></li>
</ul>
</div>
</li>
<li><a href="#"><span>Statistics</span></a>
<div>
<ul>
<li><a href="monitoring.php"><span>Monitor</span></a></li>
</ul>
</div>
</li>
<li class="last"><a href="#"><span>Contacts</span></a></li>
</ul>
</div>
I think you need to fix your html to work with lavalamp.
Request you to read the link well and I hope you will discover this, http://www.gmarwaha.com/blog/2007/08/23/lavalamp-for-jquery-lovers/
Thanks
the simple answer is type like this:
<link type="text/css" href="menu bar/menu.css" rel="stylesheet" />
<script type="text/javascript" src="menu bar/jquery.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery-1.4.2.min.js"></script> //dont copy-paste this script
<script type="text/javascript" src="menu bar/menu.js"></script>
The reason you get that error is because you did not load the lavalamp script before calling the function. Use the example provided by klox and load the scripts in this order:
-jQuery
-lavalamp
-your initialisation code
精彩评论