javascript - 使用 :not selector with $(this)

标签 javascript jquery

我有以下行可以正常工作

$("#myDiv img:not(:eq(0))").hide();

我想写一个类似的行,但使用“this”。所以:

$(this":not(:eq(0))").hide();

但这行不通...有什么地方出错了吗?

最佳答案

试试 .not(selector) http://api.jquery.com/not/

关于javascript - 使用 :not selector with $(this),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5246994/

相关文章:

javascript - Play Framework : cannot read value of textfield with javascript

javascript - 是否可以更新 iframe 内的 angularjs 表达式?

javascript - 使用 JavaScript 模拟目标 ="_top"

jquery - :invalid and :required CSS pseudo-classes don't work with jQuery traversing methods when selector matches multiple form elements

javascript - 滚动到顶部按钮跳转而不是滚动

javascript - 使用 JSZip 压缩字体文件(例如 : ArialMT. ttf)不起作用

javascript - 使用 cbpFWTabs 打开特定选项卡

javascript - 如何在ajax请求后自动选择html输入中的 "select"选项?

javascript - 在html5中交替存储为javascript数组的多个视频列表

javascript - 函数触发 onclick 表行,需要停止复选框启动函数