Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-07-2012, 01:06 PM   PM User | #1
cascadiagraphic
New to the CF scene

 
Join Date: Aug 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
cascadiagraphic is an unknown quantity at this point
jQuery lavalamp issue

Hi guys

I'm trying out this lavalamp effect on my nav but it doesn't quiet do the trick..

the effect works, but if I try clicking other links, nothing happens
here's a live demo:

http://cascadiagraphics.be/bo/index.html

http://cascadiagraphics.be/bo/contact.html

those are the 2 pages I have, but i cant get the current page selected in the nav. and I also can't click the items in the nav to go from one page to the other. don't know what to do here...

using these scripts
Code:
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.min.js"></script>
<script type="text/javascript" src="js/jquery.lavalamp.min.js"></script>  
<script type="text/javascript">
        $(function() {
            $("#3").lavaLamp({
                fx: "backout",
                speed: 700,
                click: function(event, menuItem) {
                    return false;
                }
            });
        });
 </script>
hope anyone understands my problem..

greets
cascadiagraphic is offline   Reply With Quote
Old 08-07-2012, 01:30 PM   PM User | #2
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Element ids cannot begin with a number, so change these first.

Your code returns false from the click event, telling it not to follow the links. Change it to return true. Added: I believe you can just delete "return false".

Your code doesn't tell it to highlight the current link (?). Perhaps the lavalamp feature has a setting for this that you haven't set. Added add the class "current" to the current-page li-link. You can style it differently with css.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS

Last edited by AndrewGSW; 08-07-2012 at 01:35 PM..
AndrewGSW is offline   Reply With Quote
Old 08-07-2012, 01:40 PM   PM User | #3
cascadiagraphic
New to the CF scene

 
Join Date: Aug 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
cascadiagraphic is an unknown quantity at this point
thank you AndrewGSW

I noticed the current class and placed it with the li already, that didn't do it.
But then I tried changing the "false" into "true" and problem solved!

didn't know it would be that easy

thanks alot!
cascadiagraphic is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 05:52 PM.


Advertisement
Log in to turn off these ads.