Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    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.
    Last edited by AndrewGSW; 08-07-2012 at 02:35 PM.
    "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

  • #3
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •