jQuery: selecting elements with multiple classes?

  1. <tr class=“child”>…
    $(‘.child’) works fine and selects all elements with class “child”

  2. <tr class=“child del”>
    $(‘.child)’ does not work and selects nothing

How can I fix this and select the elements in case of multiple classes? Is there something as a wild card to select any elements containing “child” as one of the classes?

It depends upon how that library uses the parameter that it’s passed. If it can take a regular expression, try:


// or


Try this:

<script type="text/javascript">
$(document).ready(function () {
<div class="child">Test1</div>
<div class="child del">Test1</div>



You must be doing something else wrong. jQuery does support multiple classes (look here: http://jsbin.com/ahaxe/edit). Can we see some more of your code?