2011-12-22 100 views
1

更新:感谢您的意见,虽然修复程序无法正常工作。即使在我不包含kjquery.js的所有加载消息仍然打印。我真的很茫然,如果你有更多的建议,请让我知道!加载jQuery打印“加载”页

当我包含jQuery的单词“加载”打印在页面的所有内容后。我曾尝试从我自己的服务器和Google API加载它,并且两次都找到了相同的结果。

这里的页面: http://kineticaid.com/k/header.php

而这里的代码:

<?php 
include('inc/functions.php'); 
include('inc/titles.php'); 
?> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> 

<head> 

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title><?php echo $title; ?></title> 

<link rel="stylesheet" type="text/css" href="css/headerstyle.css"></link> 
<link href="http://fonts.googleapis.com/css?family=Ubuntu|Arimo|PT+Sans:700|Droid+Sans|Nobile|Ovo|Corben:700&v2" rel="stylesheet" type="text/css"></link> 

<script type="text/javascript" src="js/kjquery.js"></script> 

//this is the problem line 
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> 

<script type="text/javascript" src="js/shadowbox/shadowbox.js"></script> 
<script type="text/javascript">Shadowbox.init();</script> 

</head> 

<body> 


<div id="container"> 

    <div id="top"> 
     <?php echo $quote." -".$author; ?> 
    </div> 

很显然,我没有关闭任何标签,但这些都是在footer.php文件。头文件和页脚文件都包含在一个home.php文件中,该文件在加载时也会打印单词“loading”。

+3

你有kjquery.js一个脚本错误:地铁5号线,缺少} – Keith 2011-12-22 22:32:36

+1

'kjquery.js'缺少')'。 – 2011-12-22 22:33:52

+0

“加载”消息当然不是来自jQuery本身。 – Sparky 2011-12-22 22:39:15

回答

1

此加载消息由ShadowBox lightbox插件生成,因为您在第5行的kjquery.js文件中存在错误,并且遗漏了Keith提示的)

只要你解决这个错误,所有应该工作。

2
jQuery(document).ready(function($){ 



}); 

get Firebug。你可以在几秒钟内找到答案!

0

我对不同的库有类似的问题。我尝试加载一个简单的页面,并收到页面底部的“加载”消息。

<html> 
<head> 
    <!-- content for mobile version --> 
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> 
    <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> 
</head> 
<body class="narrow"> 
    Simple Page 
</body> 
</html> 

搜索了一下后,我发现了一个链接,用于连接example that uses mobile swiping,看到移动图书馆还必须包括一个样式表。 (如果您尝试此示例并删除样式链接,则会在输出中显示加载消息。)

在包含脚本和消息消失之前包含样式表。

<link rel="stylesheet" 
    href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"> 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> 
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>