0

Possible Duplicate:
Is there a CSS parent selector?

Here is my HTML code:

<li class='href-parent'> <a class='href'></a> </li>

I want all the 'li' tags with an 'a' tag with class 'href' to change color.

Community
  • 1
  • 1
Aflext
  • 158
  • 1
  • 13

1 Answers1

0

With jQuery, you can use $('li.href-parent > a.href').parent().dosomething();

Colselaw
  • 1,019
  • 9
  • 19