$(this).next().is(':visible') 刚接触jquery者句代码是啥意思啊,看了api半天没搞懂,请指点,谢谢!

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了$(this).next().is(':visible') 刚接触jquery者句代码是啥意思啊,看了api半天没搞懂,请指点,谢谢!相关的知识,希望对你有一定的参考价值。

$(this)就是当前的元素
.next()就是的下一个同胞元素
。is('visible')应该是判断你前面抓的对象是不是可见的,后面应该还有操作的吧?
我查了下就是这样。你试试是不是。我也是刚学JQ没多久。
参考技术A $("#btnok").click()
alert($(this).next().is(":visible"));
;
<input type="button" id="btnok" value="点击我" />
<input type="button" style="display:none" />
// $(this) 当前的button按钮 $(this).next() 后面的button按钮 $(this).next().is(":visible") 后面的按钮是否可见 返回 true or false本回答被提问者采纳
参考技术B 整句话返回的是true或者false,意思是你$(this)元素的下一个元素是否可见的 可见返回true 不可见返回false 参考技术C 就是当前选择的下一个同级元素是不是可见。然后在加个事件 参考技术D 这句话的意思是判断一下当前元素的下一个元素是否可见

如何解决这个错误 jest-worker@27.0.0-next.5:The engine "node" is in compatible with this module

【中文标题】如何解决这个错误 jest-worker@27.0.0-next.5:The engine "node" is in compatible with this module【英文标题】:how to solve this error jest-worker@27.0.0-next.5:The engine "node" is incompatible with this module 【发布时间】:2021-06-29 16:58:06 【问题描述】:
linix@linix-HP-ProBook-6475b:~/projects/builds$ npx create-next-app hellochat
npx: installed 1 in 2.333s
Creating a new Next.js app in /home/linix/projects/builds/hellochat.

Installing react, react-dom, and next using yarn...

yarn add v1.22.10
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
error jest-worker@27.0.0-next.5: The engine "node" is incompatible with this module. Expected version "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0". Got "14.5.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Aborting installation.
  yarnpkg add --exact react react-dom next --cwd /home/linix/projects/builds/hellochat has failed.

linix@linix-HP-ProBook-6475b:~/projects/builds$ 

【问题讨论】:

您是否尝试过更新到 Node.js 14.15.x?由于错误表明该模块与您正在使用的当前节点版本不兼容(14.5.0)。 【参考方案1】:

你应该可以通过更新节点来解决问题。

对于 Windows:

只需从here 的 Windows 中的 .msi 重新安装节点。

适用于 Ubuntu 或 Linux/Mac:

安装模块 n 以简化版本管理:

sudo npm install n -g

对于最新的稳定版本:

sudo n stable

对于最新版本:

sudo n latest

【讨论】:

【参考方案2】:

在我的例子中,我在我的 Dockerfile 中偷偷输入了 apt update,这让系统知道了更新。保持版本严格是最佳实践。例如使用'packageName': '1.0.0' 而不是'packageName':'latest'

我能够通过删除apk update 并将我的node:alpine 版本升级到node:alpine3.13 来解决。

【讨论】:

以上是关于$(this).next().is(':visible') 刚接触jquery者句代码是啥意思啊,看了api半天没搞懂,请指点,谢谢!的主要内容,如果未能解决你的问题,请参考以下文章

如何解决这个错误 jest-worker@27.0.0-next.5:The engine "node" is in compatible with this module

How to suppress 'Maybe this is program method' warnings from ProGuard

Host '127.0.0.1' is not allowed to connect to this MySQL server

TypeError: 'encoding' is an invalid keyword argument for this function

“package ‘ElemStatLearn‘ is not available for this version of R

mysql 问题 Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is