Filter posts by categories ajax is showing nothing

You have not told WP what to do with the AJAX request, add this line in functions.php:

add_action( 'wp_ajax_filter_posts', 'ajax_filter_get_posts' );

and remove the $taxonomy parameter from ajax_filter_get_posts as it serves no purpose.