Pregunta

I want to implement the LavaLamp menu style in my site. The effect works fine (so far tested in Chrome) but when I click on any element with a link it doesn't go anywhere. This is the script:

$(function() {
    $("#1, #2, #3").lavaLamp({
        fx: "backout", 
        speed: 700,
        click: function(event, menuItem) {
            return false;
        }
    });
});

I tried adding active: "a.default", and header: "a.lavaLamp-label" and the links work but the effect stops doing so. I also tried adding $('a').attr("target") obtaining same results. Any ideas? Here is the page where I am trying it: http://pasionesargentas.webatu.com/test4.php?id=4 Thanks!

¿Fue útil?

Solución

return false will do an event.preventDefault when clicking on a link, hence removing its default behavior.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top