You have two problems
in PHP you need change this
is bad:
wp_localize_script( 'customjquery', 'ajaxurl', admin_url( 'admin-
ajax.php' ) );
change to:
wp_localize_script( 'customjquery', 'my_custom_vars', ['ajax_url' => admin_url('admin-ajax.php')] );
and your javascript need this changes
is bad:
$.ajax({
type: 'POST', // use $_POST method to submit data
dataType: "html",
url: ajaxurl,
change to:
$.ajax({
type: 'POST', // use $_POST method to submit data
dataType: "html",
url: my_custom_vars.ajax_url,