문제

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!

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top