9

jQuery Class selector works well if you have a single class assigned to an element. What if I assign two classes to an element(Ex: <div class="one two">), how can I find that element if I know these two classes?

dev.e.loper
  • 35,011
  • 72
  • 156
  • 240
  • lol.... the OP would like to accept your answer.. ;) – Reigel Jun 01 '10 at 15:02
  • possible duplicate of [jQuery multiple class selector](http://stackoverflow.com/questions/1041344/jquery-multiple-class-selector) – Olimpiu POP Feb 16 '14 at 00:51
  • Exact dupe: [Jquery multiple class selector](http://stackoverflow.com/questions/1041344/jquery-multiple-class-selector) – JMP Jun 01 '10 at 14:56

2 Answers2

6

$("div.one.two")

Matthew
  • 1,975
  • 14
  • 19
4
$('.one.two');

more on multiple selectors if you just did a search on SO first.

Community
  • 1
  • 1
Reigel
  • 62,834
  • 21
  • 119
  • 135