开发者

using jquery not() selector in Cufon

开发者 https://www.devze.com 2023-03-18 02:26 出处:网络
I am using Cufon to replace some list items in a nav. There is some content inside a div element (which is insid开发者_如何学Pythone the list item) that I dont want replaced.I was hoping this would wo

I am using Cufon to replace some list items in a nav. There is some content inside a div element (which is insid开发者_如何学Pythone 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


If I understand your question correctly, you can use the :has() selector:

Cufon.replace("li:not(:has(div))");
0

精彩评论

暂无评论...
验证码 换一张
取 消