8 - How to run jQuery to show a div, after register form is submitted?
I used like below and it works for me:

function MYMODULE_form_alter( &amp;$form, &amp;$form_state, $form_id ) {
  if ( TRUE === in_array( $form_id, array( 'user_register_form') ) ) {
      foreach (array_keys($form['actions']) as $action) {
        if ($action != 'preview' &amp;&amp; isset($form['actions'][$action]['#type']) &amp;&amp; $form['actions'][$action]['#type'] === 'submit') {
          $form['actions'][$action]['#submit'][] = '_message_submit';
        }
      }
  }
}
function _message_submit(array &amp;$form, FormStateInterface $form_state) {
  $values = $form_state-&gt;getValues();
  drupal_set_message(t('The user @name account has been created successfully.', ['@name' =&gt; $values['name']]));
}