I'm very new to JavaScript and jQuery. However, I've jumped into trying to make inline edit for my wp_list_table but find it difficult to catch the class for some reason.

The classes for the column I'm trying to catch is named

<td class="director column-director">

I've tried the 2 following statements below to check that I actually catch the class correctly:

$( ".director").click(function() {
  alert( "Handler for .click() called." );

$( ".director", '.column-director' ).click(function() {
  alert( "Handler for .click() called." );

The console shows no errors and nothing is happening when I click the <td>. Is there anyone that can tell me what I'm doing wrong?

  • replace $( ".director", '.column-director' ) by $( ".director, .column-director")
    – Karun
    Jun 29, 2015 at 9:35
  • Ty for the answer Karun now i know how to mark serval classes at once :) but it did'nt work, konsol shows no errors and nothing happens when i press the td.
    – Alexander
    Jun 29, 2015 at 9:39
  • Is your table an Ajax return? I tested the jQuery code. It was ok. Anyways try replacing $ by jQuery
    – Karun
    Jun 29, 2015 at 9:40

1 Answer 1


Replace $( ".director", '.column-director' ) by $( ".director, .column-director") and also replace $ by jQuery

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.