Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
jQuery lavaLamp problem
Old 08-02-2009, 09:45 AM jQuery lavaLamp problem
pealo86's Avatar
Super Spam Talker

Posts: 850
Name: Matt Pealing
Location: England, north west
Trades: 0
I'm trying to get lavaLamp to work using this tutorial http://www.gmarwaha.com/blog/2007/08...jquery-lovers/

Here is the code I have so far:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
/* Styles for the entire LavaLamp menu */
.lavaLamp {
    position: relative;
    height: 29px; width: 421px;
    background: black;
    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: red;
            width: 9px; height: 30px;
            z-index: 8;
            position: absolute;
        }
            .lavaLamp li.back .left {
                background: red;
                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;
        }
</style>
<script type="text/javascript" src="script/js/jquery.js"></script>
<script type="text/javascript" src="script/js/jquery.lavalamp.js"></script>
<!-- Optional -->
<script type="text/javascript" src="script/js/jquery.easing.js"></script>

<script type="text/javascript">
    $(function() { $(".lavaLamp").lavaLamp({ fx: "backout", speed: 700 })});
</script>


</head>

<body>

<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>

</body>
</html>

But it doesn't work! When I hover over a link in the menu the error console presents this error message (4 times)

Quote:
Error: o.easing[this.options.easing || (o.easing.swing ? "swing" : "linear")] is not a function
Source File: file:///C:/Users/Pealo/Documents/design/2009/mrphotography.biz/script/js/jquery.js
Line: 19
I dont have a clue where the problem could be though!
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
 
Register now for full access!
Old 08-02-2009, 12:56 PM Re: jQuery lavaLamp problem
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Is the path to the easing plugin correct?
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 08-03-2009, 04:26 PM Re: jQuery lavaLamp problem
pealo86's Avatar
Super Spam Talker

Posts: 850
Name: Matt Pealing
Location: England, north west
Trades: 0
Yup I think so, I've uploaded the files here if that helps:
http://www.mattpealingdesign.co.uk/f...alamp/lava.htm

Another thing that puzzles me (Im not sure if it's what is causing the error), but from looking at the actual jQuery library in Dreamweaver it looks as though all of the syntax highlighting is messed up
http://www.mattpealingdesign.co.uk/file/lavalamp/js.jpg

It's as if there is a ' or a " where there shouldn't be?? I've tried downloadin jQuery again aswell as checking my other copies and they all show up the same.

Thanks
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Last edited by pealo86; 08-03-2009 at 04:33 PM..
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
Old 08-03-2009, 05:47 PM Re: jQuery lavaLamp problem
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Don't worry about the highlighting thing... Dreamweaver gets choked up by regular expressions in JavaScript. It's a huge reason I switched away from it. I've noticed the same thing in jQuery when viewing its source in DW.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Reply     « Reply to jQuery lavaLamp problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19688 seconds with 12 queries