Add clickable function in functions.php – parse error [closed]

For clarity’s sake regarding my comments, this is something more akin to what I’m talking about…

// plugins/wpse392844/wpse392844.php

function wpse392844_enqueue_assets() {
  wp_enqueue_script(
    'wpse392844-frontend',
    plugins_url( 'assets/js/frontend.js', __FILE__ )
  );
}

add_action( 'wp_enqueue_scripts', 'wpse392844_enqueue_assets' );
// plugins/wpse392844/assets/js/frontend.js

function thfull() {
  document.getElementById('thf').style.maxHeight="1000px";
}

(we’re defining the thfull() function in JavaScript rather than PHP such that the browser will be aware of and able to use it. The PHP just makes sure that the browser loads the JS)