Each table row has an id value like id=”jsmspm-1-meta_name” which, after successful deletion via ajax, is passed back to jQuery, which then does:
jQuery( '#' + table_row_id ).hide();
It’s a pretty standard selector, so I’m not sure how that could fail.
https://api.jquery.com/id-selector/
It does seem like there might be an extra space in your error?
That would be odd since there is no space in the value returned by PHP:
$table_row_id = sanitize_key( $metabox_id . '-' . $obj_id . '-' . $meta_key );
die( $table_row_id );
js.
Further testing suggests that you have a plugin or theme corrupting the output of ajax calls with a newline character. You should find the plugin or theme doing that and get it fixed, otherwise any process using an ajax call on your site can fail, depending how it uses that ajax output.
js.
Thanks for your input JS. I’ll debug it.
Best.
Thanks for adding the Trim on the update. I actually couldn’t find what was causing it.
No problem. Don’t forget to leave a review. 😉
js.