0

My CSS selector is like this:

.s4-ql ul.root > li > menu-item

I need to do some dynamic coloring on that item, so need to select the element using jQuery.

How do I do that?

jQuery('.s4-ql ul.root > li > menu-item')

doesn't seem to work because it doesn't seem to understand the > character or something. Can someone help me to select the menu-item?

4

2 回答 2

1

> 受 jQuery 支持。您可能实际上并没有用它选择正确的对象。似乎菜单项没有被指定为一个类,应该是吗?

于 2013-04-26T21:33:59.160 回答
0

menu-item是一堂课?然后在它前面加上一个点.menu-item,或者如果它是一个 ID,那么在它前面加上一个 ##menu-item

于 2013-04-26T21:41:56.587 回答