首页 文章

单击滚动上的jQuery无法正常工作

提问于
浏览
0

单击图像右侧的白色块应滑动到奇妙的用餐页面,但似乎没有做任何事情 .

http://www.wondercafe.co.uk/test/

我在元素检查器中收到以下错误消息:

无法加载资源:服务器响应状态为404(未找到)

<script type="text/javascript">
$.getDocHeight = function(){
    return Math.max(
        $(document).height(),
        $(window).height(),
        /* For opera: */
        document.documentElement.clientHeight
    );
    };
    $(document).ready(function() {
        $('#wonder-diner #ajax-wrapper').load('/node/10 #wonder-diner', function() {
            $('#wonder-diner #wonder-diner #clicker').remove();
            $('#wonder-diner #ajax-wrapper #scroll').jScrollPane();
            var centerwidth = $(window).width() - $('#sidebar-left').width() - $('#clicker').width() - $('#center').width() - 15;
        $('#wonder-diner #center').css({ 'left' : centerwidth / 2 + $('#clicker').width() + 2.5, 'margin' : '0', 'position' : 'absolute' });
        if ($(window).width() < 937) {
            $('#wonder-diner #center').css({ 'right' : '230px' });
        }

            var contentHeight = $.getDocHeight() - ($('#footer').height() + 15) - (26 + 15) - 80; // Height of window - (footer height + padding bottom) - (margin top of #aqueeze + padding top) - padding on .inside
        $('#wonder-diner #wrapper #container #center .inside').css({'height' : contentHeight});
        $('#wonder-diner #scroll').css({'height' : contentHeight});
        $('#wonder-diner #scroll').not($('.page-food-drink #scroll, .page-roastery-coffees #scroll')).jScrollPane({ verticalDragMaxHeight: 100 });

        $(window).bind('resize', function () {

    var contentHeight = $.getDocHeight() - ($('#footer').height() + 15) - (26 + 15) - 80; // Height of window - (footer height + padding bottom) - (margin top of #aqueeze + padding top) - padding on .inside
    $('#wonder-diner #wrapper #container #center .inside').css({'height' : contentHeight});
    var centerwidth = $(window).width() - $('#sidebar-left').width() - $('#clicker').width() - $('#center').width() - 15;
    $('#wonder-diner #center').css({ 'left' : centerwidth / 2 + $('#clicker').width() + 2.5, 'margin' : '0', 'position' : 'absolute' });
    $('#wonder-diner #scroll').css({'height' : contentHeight});
    $('#wonder-diner #scroll').not($('.page-food-drink #scroll, .page-roastery-coffees #scroll')).jScrollPane({ verticalDragMaxHeight: 100 });

    if ($(window).width() < 937) {
        $('#wonder-diner #center').css({ 'right' : '230px' });
    }

});
        });
        $('.scrollPage').click(function() {
            var elementClicked = $(this).attr("href");
            var destination = $(elementClicked).offset().left;
            $("html:not(:animated),body:not(:animated)").animate({ scrollLeft: destination}, 500, 'linear' );
        return false;
        });

        $('li.menu-2409 a').click(function() {
            var elementClicked = $(this).attr("href");
            var destination = $(elementClicked).offset().left;
            $("#holder").animate({
                    left: '-100%'
                }, 500, 'linear');
            return false;
        });
        $('li.menu-2456 a').live('click', function() {
            //var elementClicked = $(this).attr("href");
            var destination = $('#restaurant').offset().left;
            $("#holder").animate({
                    left: '0'
                }, 500, 'linear');
            return false;
        });
    });
    </script>

1 回答

  • 0

    .load('/node/10 #wonder-diner' 不是正确的网址 .

相关问题