delegate click is depcreted $( "table" ).on( "click", "td", function() { $( this ).toggleClass( "chosen" ); });