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
  • 309
  • 4
  • 15

1 Answers1

0

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

Colselaw
  • 1,069
  • 9
  • 21