开发者

jQuery Minimal Menu links not working

开发者 https://www.devze.com 2023-03-21 22:18 出处:网络
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 blocki

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 开发者_StackOverflowjquery-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.


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
});


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');
    }
});
0

精彩评论

暂无评论...
验证码 换一张
取 消