在 Cufon 中使用 jquery not() 选择器
我正在使用 Cufon 替换导航中的一些列表项。 div 元素(位于列表项内)内有一些我不想替换的内容。我希望这会起作用......
Cufon.replace('li:not("li div")');
但事实并非如此。
我意识到,如果排除适用于兄弟姐妹,我可以使用类似...
Cufon.replace('li:not(li.dontreplace)');
但我想排除一个 div,它是 LI 的孩子,
有人可以帮忙吗?
干杯
I am using Cufon to replace some list items in a nav. There is some content inside a div element (which is inside the list item) that I dont want replaced. I was hoping this would work...
Cufon.replace('li:not("li div")');
But it doesn't.
I realize that if the exclusion applied to a sibling I could use something like...
Cufon.replace('li:not(li.dontreplace)');
But i want to exclude a div which is a CHILD of the LI
Can someone help please?
cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我正确理解您的问题,您可以使用 :has() 选择器:
If I understand your question correctly, you can use the :has() selector: