-1

这个网站有问题我想在这里维护:http: //www.homehatchery.com/

我似乎无法让子级链接在主导航中工作。将鼠标悬停在它们上方时,我可以看到它是一个链接,但是单击它时它将不起作用。我认为这可能是 z-index 问题,但我不相信它是。

有任何想法吗?

4

2 回答 2

2

So your javascript error is because this function gets the part of the url after the '#', but on your homepage your url does not fit that specification:

$(".scroll").click(function (event) {
    event.preventDefault();
    var full_url = this.href;
    var parts = full_url.split("#");
    var trgt = parts[1];
    var target_offset = $("#" + trgt).offset();
    var target_top = target_offset.top;

    $('html, body').animate({
        scrollTop: target_top
    }, 500);
});
于 2013-06-07T17:35:14.413 回答
0

Your smooth scrolling is interfering with it. what you would have to do is remove the class "scroll" form the menu items and that should fix it.

于 2013-06-07T17:18:45.060 回答