2012-02-11 78 views
0

我在我的网站上工作,我陷入了僵局:我在导航栏中创建的链接不会将用户重定向到我网站上的另一个页面。链接不重定向用户

可以看到here,我正在使用一个简单的导航栏,并使用了一种技术,我发现at gmarwaha.com。我试图尽可能按照说明操作,但似乎我错过了一步 - 很不幸,我无法弄清楚这一步是什么!

该CSS与网站上的内容有点不同,但它仍然来自那里,无论如何。它可以看到下面:

.lavaLampBottomStyle { 
    position: relative; 
    height: 29px; 
    width: 342px; 
    background-color: white; 
    padding: 15px; 
    margin: 10px 0; 
    overflow: hidden; 
    border: 1px solid gray; 
    margin-left: auto; 
    margin-right: auto; } 
     .lavaLampBottomStyle li { 
      float: left; 
      list-style: none; 
     } 
      .lavaLampBottomStyle li.back { 
       border-bottom: 5px solid blue; 
       width: 9px; 
       height: 30px; 
       z-index: 8; 
       position: absolute; 
      } 
      .lavaLampBottomStyle li a { 
       font: bold 14px arial; 
       text-decoration: none; 
       color: #000; 
       outline: none; 
       text-align: center; 
       top: 7px; 
       text-transform: uppercase; 
       letter-spacing: 0; 
       z-index: 10; 
       display: block; 
       float: left; 
       height: 30px; 
       position: relative; 
       overflow: hidden; 
       margin: auto 10px; 
      } 
       .lavaLampBottomStyle li a:hover, .lavaLampBottomStyle li a:active, .lavaLampBottomStyle li a:visited { 
        border: none; 
       } 

中的JavaScript放在我的文档head也很重要:

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

如果有人能够帮我找到这个错误,我会非常感谢。

回答

3

从示例代码很难说,但从点击返回false将阻止该操作。

+0

你用那个钉在头上。我甚至没有想到这个! – nmagerko 2012-02-11 02:07:45