2012-08-09 114 views
0

我在wordpress中使用此代码来显示jquery,但它不显示。如何在wordpress中设置此代码

if (typeof jQuery == 'undefined'){ 
    document.write(unescape("%3Cscript src="<?php bloginfo('template_directory'); ?>/js/jquery.js" type='text/javascript'%3E%3C/script%3E")); 
} 

回答

0

试试这个:

if (typeof jQuery == 'undefined'){ 
    document.write(unescape("%3Cscript src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type='text/javascript'%3E%3C/script%3E")); 
}