How to select all elements that don't have a class or id?

Cris

If I want to select the elements that don't have a class (but may have an ID), the following

$(".entry-container ul:not([class])").addClass("list type-1"); works fine.

If I want to select the elements that don't have an ID (but may have a class) the following

$(".entry-container ul:not([id])").addClass("list type-1"); works fine.

But what if I want to select all the elements that don't have a class AND and an ID?

PSL

Try

$(".entry-container ul:not([id],[class])").addClass("list type-1");

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

How can I select the item that doesn't have attribute

来自分类Dev

UNION ALL Query for tables that don't match

来自分类Dev

How can I apply a jQuery function to all elements with the same class.?

来自分类Dev

Why don't methods of structs have to be declared in C++?

来自分类Dev

没有ID或Class的jQuery select元素

来自分类Dev

没有Class或ID的jQuery Select元素

来自分类Dev

没有ID或Class的jQuery select元素

来自分类Dev

Delete all elements with same class attribute but leaving one

来自分类Dev

How to create a Guid with all zero elements?

来自分类Dev

How to initialize all tuple elements by the same arguments?

来自分类Dev

In NHibernate, how to delete all elements of an associated set?

来自分类Dev

How to get ID on SVG Elements using mxGraph

来自分类Dev

Jquery selector to get all select dropdowns with ID pattern

来自分类Dev

Select all Child Table ID for a Matching Parent of a Child

来自分类常见问题

"You don't have a SNAPSHOT project in the reactor projects list." when using Jenkins Maven release plugin

来自分类Dev

How to do a fixed sprite (that don't move with my camera) in libgdx?

来自分类Dev

How to get perforce to pull only files that don't exist in workspace

来自分类Dev

SELECT * FROM t TTX OR TY IN(从z选择ID)

来自分类Dev

how to enable search btn when all 3 inputs have value?

来自分类Dev

Oracle SQL UNION ALL,其中T1.ID <> T2.ID

来自分类Dev

How to elegantly modify all elements in a container in-place?

来自分类Dev

d3.js-d3.select(“#id).remove()或.attr(” class“,” hidden“)不起作用

来自分类Dev

How to delete tt_content elements which do not have any connection to a page

来自分类Dev

Spring JPA/Hibernate org.hibernate.AssertionFailure: null id in Entity (don't flush the Session after an exception occurs)

来自分类Dev

Hibernate create, don't update, don't drop.

来自分类Dev

Fortran 的 Makefile 给出了这个错误:make: don't know how to make datastructures.o

来自分类Dev

Select all 'a' Node with HtmlAgilityPack

来自分类Dev

How to select servers that does not have a date record in a separate table between a date range?

来自分类Dev

Select same elements matrix in R

Related 相关文章

  1. 1

    How can I select the item that doesn't have attribute

  2. 2

    UNION ALL Query for tables that don't match

  3. 3

    How can I apply a jQuery function to all elements with the same class.?

  4. 4

    Why don't methods of structs have to be declared in C++?

  5. 5

    没有ID或Class的jQuery select元素

  6. 6

    没有Class或ID的jQuery Select元素

  7. 7

    没有ID或Class的jQuery select元素

  8. 8

    Delete all elements with same class attribute but leaving one

  9. 9

    How to create a Guid with all zero elements?

  10. 10

    How to initialize all tuple elements by the same arguments?

  11. 11

    In NHibernate, how to delete all elements of an associated set?

  12. 12

    How to get ID on SVG Elements using mxGraph

  13. 13

    Jquery selector to get all select dropdowns with ID pattern

  14. 14

    Select all Child Table ID for a Matching Parent of a Child

  15. 15

    "You don't have a SNAPSHOT project in the reactor projects list." when using Jenkins Maven release plugin

  16. 16

    How to do a fixed sprite (that don't move with my camera) in libgdx?

  17. 17

    How to get perforce to pull only files that don't exist in workspace

  18. 18

    SELECT * FROM t TTX OR TY IN(从z选择ID)

  19. 19

    how to enable search btn when all 3 inputs have value?

  20. 20

    Oracle SQL UNION ALL,其中T1.ID <> T2.ID

  21. 21

    How to elegantly modify all elements in a container in-place?

  22. 22

    d3.js-d3.select(“#id).remove()或.attr(” class“,” hidden“)不起作用

  23. 23

    How to delete tt_content elements which do not have any connection to a page

  24. 24

    Spring JPA/Hibernate org.hibernate.AssertionFailure: null id in Entity (don't flush the Session after an exception occurs)

  25. 25

    Hibernate create, don't update, don't drop.

  26. 26

    Fortran 的 Makefile 给出了这个错误:make: don't know how to make datastructures.o

  27. 27

    Select all 'a' Node with HtmlAgilityPack

  28. 28

    How to select servers that does not have a date record in a separate table between a date range?

  29. 29

    Select same elements matrix in R

热门标签

归档