Alex
Alex

Reputation: 105

jQuery Minimal Menu links not working

I'm newbie to jQuery and Im' using a minimal menu with jQuery triger. I've linked the hyperlinks in this menu but its not clickable even not working. It seems that jQuery defaultprevent() is blocking links. When I remove defaultprevent() lines from jquery-1.4.min.js, links starts working but the menu trigger / hover went away.

Can anyone help me? I want hyperlinks to work with menu hover/trigger.

Upvotes: 1

Views: 722

Answers (2)

Greg Guida
Greg Guida

Reputation: 7512

Replace your code with this... and put .preventDefault() back into jQuery

$("#one").lavaLamp({
    fx: "backout", 
    speed: 700,
    click: function(event, menuItem) {
         window.location.href = $(this).find('a').attr('href');
    }
});

Upvotes: 1

Nicola Peluchetti
Nicola Peluchetti

Reputation: 76870

Your menu doesn't work i think because there is a click handler that return false:

$("#one,#two,#three,#four,#five,#six,#seven,#eight").lavaLamp({
fx: "backout",
speed: 700,
click: function(event, menuItem) {
return false;
} 

try taking off the last part

$("#one,#two,#three,#four,#five,#six,#seven,#eight").lavaLamp({
fx: "backout",
speed: 700
});

Upvotes: 1

Related Questions