How to hide a form element having a certain class in ajax callback in form?
AJAX Commands are supposed to be returned in the callback function, not printed. Also, you have to give a CSS valid selector.

Try this:

function _change_table_product_type(&amp;$form,&amp;$form_state){
  $commands = array();
  $product_type = $form_state['values']['field_product_type_select']['und'][0]['value'];
  drupal_set_message($product_type);
  $commands[] = ajax_command_invoke('.display-' . $product_type, 'show');

  return array('#type' =&gt; 'ajax', '#commands' =&gt; $commands);

}


You can show the actual selector that code generates and test it in the JavaScript console. Just type:

 jQuery('CSS_SELECTOR').show();


If element is shown your CSS selector code is right.