开发者

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 开发者_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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜