11

I have an anchor tag like this, and I need to select it!

<a href="#" class="foo bar" rel="123">...</a>

Is it possible with jQuery to write a selector that selects an anchor that has class like foo bar and rel like 123?

Don't Panic
  • 41,125
  • 10
  • 61
  • 80
daGrevis
  • 21,014
  • 37
  • 100
  • 139

1 Answers1

22

You can use something like:

$('a.foo.bar[rel="123"]')
Qtax
  • 33,241
  • 9
  • 83
  • 121