0
点击图片右侧的白色块应滑动到奇迹餐厅页面,但它似乎没有做任何事情。点击滚动时jQuery不起作用
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>
我记下它是否会解决任何问题,但404错误是因为http://www.wondercafe.co.uk/node/10在运行.load函数时未找到 –