Question

I have a problem with my lava lamp script. generally speaking - URLs are not working. they seem ok in html, so I assume it must be a jQuery code which locks everything inside the page. Could you please take a look and let me know what is wrong with it? This issue drives me mad. Thanks. HTML Code here - looks ok to me:

    <script type="text/javascript">
    $(function() {
        $(".menu-lava").lavaLamp({
            fx: "backout",
            speed: 700,
            click: function(event, menuItem) {
                return false;
            }
        });
    });
</script>


    <ul class="menu-lava">
        <li class="current"><a href="index.html">Home</a></li>
        <li><a href="corporate-events.html">Corporate Events</a></li>
        <li><a href="private-parties.html">Private Parties</a></li>
        <li><a href="av-equipment-hire.html">AV Equipment Hire</a></li>
        <li><a href="clients.html">Clients</a></li>
        <li><a href="about-us.html">About Us</a></li>
        <li><a href="contact-us.html">Contact Us</a></li>
    </ul>

Then the actual page with links to .js files in source: LINK TO THE ACTUAL PAGE - please see the source code and jquery.lavalamp.min.js - this may be a problematic code

Was it helpful?

Solution 2

By returning false, you prevent the default behavior of the link from occurring:

$(function() {
    $(".menu-lava").lavaLamp({
        fx: "backout",
        speed: 700,
        click: function(event, menuItem) {
            return false;  // <--- Right here
        }
    });
});

OTHER TIPS

    $(function() {
        $(".menu-lava").lavaLamp({
            fx: "backout",
            speed: 700,
            click: function(event, menuItem) {
                return false;//prevents default
            }
        });
    });

I think return false is the problem. It prevents the default action.

Try disabling the 'return false' in your click event.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top