gpt4 book ai didi

jquery - "Uncaught ReferenceError: jquery is not defined"- 但它是

转载 作者:行者123 更新时间:2023-12-01 07:21:18 25 4
gpt4 key购买 nike

我已经准备了一些类似的问题,并已验证 jquery 是第一个包含的脚本...

// this test confirms that jquery is defined
if (typeof jQuery == 'undefined') {
alert('jquery not defined');
}
// (this is being alerted)
else { alert( 'jquery is defined'); }

// this is what I want to achieve (to begin with)
jquery("#free-signup").css( 'display', 'none' );

jquery 似乎确实被定义了......我做错了什么?!

最佳答案

JavaScript 区分大小写。您应该使用正确的对象名称:

// v
jQuery("#free-signup").css( 'display', 'none' );

或快捷方式:

$("#free-signup").css( 'display', 'none' );

关于jquery - "Uncaught ReferenceError: jquery is not defined"- 但它是,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13473325/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com