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))");
精彩评论