未捕获的引用错误:jquery 未在 Wordpress 中定义


Uncaught ReferenceError: jquery is not defined in Wordpress

谁能帮我解决这个问题。我已经在外部向我的WordPress网站添加了一个JS。它不会生成输出,并在以下代码中引发错误。

请帮助我并克服它。

var clock;
jquery(document).ready(function() {
    var currentDate = new Date();
    // Set some date in the past. In this case, it's always been since Jan 1
    var pastDate  = new Date(currentDate.getFullYear(), - 3, 4, 3);
    // Calculate the difference in seconds between the future and current date
    var diff = currentDate.getTime() / 1000 - pastDate.getTime() / 1000;
    clock = jquery('.clock').FlipClock(diff, {
        clockFace: 'MinuteCounter'
    });
});

JavaScript 区分大小写。使用jQuery而不是jquery

jQuery(document).ready(function() {
    .
    .
    .
    clock = jQuery('.clock').FlipClock(diff, {
        clockFace: 'MinuteCounter'
    });
});