【发布时间】:2021-03-22 06:22:29
【问题描述】:
我有图像,每个图像都有两个类。这是 HTML 的相关部分。
class = "thing other0-a"
class = "thing other1-a"
class = "thing other2-a"
class = "thing other3-a"
class = "thing other0-b"
class = "thing other1-b"
class = "thing other2-b"
如何使用 jQuery 选择带有“thing”的类以及是否包含“-a”?
我知道如何做 [class*=-a],但我不知道如何结合选择完全匹配和包含匹配。
【问题讨论】:
标签: javascript jquery class