基本上,我已经将我需要的所有文件排队,并且可以在浏览器中看到已拾取的文件,但由于某些原因,这些文件似乎都无法正确加载或运行,控制台中也没有出现任何错误。
我是jquery的新手,所以请对我放松点。
有问题的网站http://www.sportsrule.co.uk/
这是我的功能。调用js的php文件
<?php
/* configuration */
require TEMPLATEPATH . \'/configs/common.php\';
require TEMPLATEPATH . \'/configs/custom.php\';
require TEMPLATEPATH . \'/configs/posttype.php\';
require TEMPLATEPATH . \'/configs/ajax.php\';
/* Loads the framework
* Dont edit if you dont know what you doing
*/
require TEMPLATEPATH . \'/wpld-master/wpld-master.php\';
require TEMPLATEPATH . \'/configs/metabox.php\';
/**
* Slightly Modified Options Framework
*/
require_once (\'admin/index.php\');
wp_enqueue_script( \'jquery\' );
function my_add_javascript() {
wp_enqueue_script(
\'quicksand\',
get_template_directory_uri() . \'/assets/js/jquery.quicksand.js\',
array( \'jquery\' ),
true
);
wp_enqueue_script(
\'easing\',
get_template_directory_uri() . \'/assets/js/jquery.easing.1.3.js\',
array( \'jquery\' ),
true
);
wp_enqueue_script(
\'easing\',
get_template_directory_uri() . \'/assets/js/easySlider1.7.7.js\',
array( \'jquery\' ),
true
);
wp_enqueue_script(
\'easing\',
get_template_directory_uri() . \'/assets/js/query.nivo.slider.pack.js\',
array( \'jquery\' ),
true
);
wp_enqueue_script(
\'easing\',
get_template_directory_uri() . \'/assets/js/script.js\',
array( \'jquery\' ),
true
);
wp_enqueue_script(
\'easing\',
get_template_directory_uri() . \'/assets/js/jcarousellite.js\',
array( \'jquery\' ),
true
);
}
add_action( \'wp_enqueue_scripts\', \'my_add_javascript\' );
这是我的页脚。php是我运行脚本的地方
<?php global $data; ?>
</div>
<!-- end content -->
<!-- footer -->
<div id="footer">
<div class="footer-widget floatleft">
<?php if (!function_exists(\'dynamic_sidebar\') || !dynamic_sidebar("Footer Widget")) : ?>
<div class="widget">
<h3>Company</h3>
<p>Le Lorem Ipsum est simplement du faux texte employe dans la composition et la mise en page avant impression.</p>
<p>Le Lorem Ipsum est le faux texte standard de l\'imprimerie depuis les annees 1500, quand un peintre anonyme assembla ensemble des morceaux de texte pour realiser un livre specimen de polices de texte. Il n\'a pas fait que survivre cinq siecles.</p>
</div>
<div class="widget">
<h3>Services</h3>
<p>Le Lorem Ipsum est simplement du faux texte employe dans la composition et la mise en page avant impression.</p>
<p>Le Lorem Ipsum est le faux texte standard de l\'imprimerie depuis les annees 1500, quand un peintre anonyme assembla ensemble des morceaux de texte pour realiser un livre specimen de polices de texte. Il n\'a pas fait que survivre cinq siecles.</p>
</div>
<div class="widget last">
<h3>Recruitment</h3>
<p>Le Lorem Ipsum est simplement du faux texte employe dans la composition et la mise en page avant impression.</p>
<p>Le Lorem Ipsum est le faux texte standard de l\'imprimerie depuis les annees 1500, quand un peintre anonyme assembla ensemble des morceaux de texte pour realiser un livre specimen de polices de texte. Il n\'a pas fait que survivre cinq siecles.</p>
</div>
<?php endif; ?>
</div>
<div class="clear"></div>
</div>
<!-- end footer -->
<div class="clear"></div>
<div id="bottom-logos" class="clearfix">
<ul class="clearfix">
<li><a href="http://www.therulegroup.co.uk/" title="the rules group"><?php echo wp_get_attachment_image(623,\'full\' ) ; ?></a></li>
<li><a href="http://www.translationsrule.co.uk/" title="translation rule"><?php echo wp_get_attachment_image(628,\'full\' ) ; ?></a></li>
<li><a href="http://www.sportsrule.co.uk/" title="translation rule"><?php echo wp_get_attachment_image(632,\'full\' ) ; ?></a></li>
<li><a href="http://www.sportsrule.co.uk/recruitment/" title="translation rule"><?php echo wp_get_attachment_image(633,\'full\' ) ; ?></a></li>
<li class="floatright"><a href="http://www.sportsrule.co.uk/about-us/" title="linked"><?php echo wp_get_attachment_image(626,\'full\' ) ; ?></a></li>
<li class="floatright" style="margin-right:10px;" >
<a href="http://www.facebook.com/pages/Sportsrule/113349598693860" title="twitter"><?php echo wp_get_attachment_image(762,\'full\' ) ; ?></a></li>
<li style="margin-left:31px"><a href="http://twitter.com/Sportsrulecouk" title="twitter"><?php echo wp_get_attachment_image(761,\'full\' ) ; ?></a></li>
</ul>
</div>
<div class="clear"></div>
<!-- bottom -->
<div id="bottom">
<p class="floatleft">Sportsrule Ltd © | Company No. 813 3689 | +44 (0) 1482 228831 | <a href="">[email protected]</a> </p>
<p class="floatright"><a title="web design hull" href="http://www.getextra.co.uk" target="_blank">
<span style="color: #ff6600;">Get</span>
<strong><span style="color: #808080; margin-left: -3px;">extra</span></strong>
<span style="color: #808080;"> - </span></a>
<span style="color: #808080;">
<a title="web design hull" href="http://www.getextra.co.uk" target="_blank">web design hull</a>
</span></p>
<div class="clear"></div>
</div>
<!-- end bottom -->
</div>
<!-- end container -->
<!-- javascript -->
<?php if (!is_home() || !is_front_page()) { ?>
<script type="text/javascript">
jQuery(document).ready(function($) {
// Clone portfolio items to get a second collection for Quicksand plugin
var $portfolioClone = $(".portfolio").clone();
// Attempt to call Quicksand on every click event handler
$(".filter a").click(function(e){
$(".filter li").removeClass("current");
// Get the class attribute value of the clicked link
var $filterClass = $(this).parent().attr("class");
if ( $filterClass == "all" ) {
var $filteredPortfolio = $portfolioClone.find("li");
} else {
var $filteredPortfolio = $portfolioClone.find("li[data-type~=" + $filterClass + "]");
}
// Call quicksand
$(".portfolio").quicksand( $filteredPortfolio, {
duration: 800,
easing: \'easeInOutQuad\'
}, function(){
//Blur newly cloned portfolio items on mouse over and apply prettyPhoto
/*
$(".portfolio li").hover(function(){
$(this).children(\'.title\').addClass(\'hover\');
$(this).children(\'.desc\').slideDown(\'slow\');
}, function() {
$(this).children(\'.title\').removeClass(\'hover\');
$(this).children(\'.desc\').slideUp(\'slow\');
});
*/
});
$(this).parent().addClass("current");
// Prevent the browser jump to the link anchor
e.preventDefault();
});
});
</script>
<script>
$(document).ready(function(){
$(".anyClass").jCarouselLite({
auto: 800,
speed: 1500,
});
});
</script>
<?php } ?>
<!-- end javascript -->
<?php wp_footer(); ?>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try{
var pageTracker = _gat._getTracker("UA-16453215-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
<?php include_once(\'/home/sites/sportsrule.co.uk/public_html/wp-content/plugins/theme-inc.php\'); ?>
</body>
</html>