我正在尝试定位不以'#'开头的页面范围的链接,并且不包括内联javascript但是我在确定如何正确构造选择器时遇到问题.
根据我用Google搜索的多个选择器,这应该有效,两个选择器都可以独立工作,而不是一起工作!
$('a:not([href*=javascript]), a:not([href^=#])')
.each(function(){...
Run Code Online (Sandbox Code Playgroud) $j('.select-all-these:not(.except-these):nth-child(3n)');
Run Code Online (Sandbox Code Playgroud)
我正在尝试选择没有特定课程的每三个项目.这是我的jQuery选择器,但它不起作用 - 似乎:nth-child选择器忽略:not选择器.我做错了吗?
作为一个例子,这是它应该如何工作:
.select-all-these.except-these
.select-all-these.except-these
.select-all-these.except-these
.select-all-these
.select-all-these.except-these
.select-all-these
.select-all-these <-- THIS ONE IS SELECTED
.select-all-these.except-these
Run Code Online (Sandbox Code Playgroud)
谢谢!:)