我将此用作入门模板:www.html5reset.org/
这很好,但我认为jQuery有问题。
在functions.php
上面写着:
// Load jQuery
if ( !function_exists(core_mods) ) {
function core_mods() {
if ( !is_admin() ) {
wp_deregister_script(\'jquery\');
wp_register_script(\'jquery\', ("//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"), false);
wp_enqueue_script(\'jquery\');
}
}
core_mods();
}
这对我来说很好,可以吗?还有一个预制JS文件。该文件中写道:
// remap jQuery to $
(function($){})(window.jQuery);
我不知道这到底是怎么回事,但似乎也没问题。为了测试jQuery是否有效,我尝试了以下方法-没有一个有效,jQuery没有定义。
$(document).ready(function() {
alert("This is a test.");
});
jQuery(document).ready(function() {
alert("This is a test.");
});
$(document).ready(function($) {
alert("This is a test.");
});
那么,你能告诉妈妈这有什么问题吗?非常感谢。